On Jan 7, 7:52 am, Dharmdip Rathod <[email protected]> wrote: > Getting strange error while performing rake task. > > Automated creating users for testing. > > It's creating users till number 999, getting error while creating user > 1000. > > Rake Task : > > desc "Generate test users" > task :generate_test_users => :environment do > for i in (1..5000) > User.create(:username=>"user#{i}", :email=>"user#[email protected]", > :password=>"123456", :confirm_password=>"123456", :state=>"Active", > :first_name=>"user_first#{i}", :last_name=>"user_last#{i}", > :activation_state=>"Active", :is_admin=>false, :product_source=>"Both") > puts "user#{i}" > end > > end > > Please suggest. > > Attachments:http://www.ruby-forum.com/attachment/6889/Screenshot.png
It's blowing up in an SMTP transfer - my guess is that whatever email server you've set up for ActionMailer is rate-limiting at 1000 emails. If you're just trying to set up some dummy user accounts, you may want to set ActionMailer::Base.delivery_method = :test at the beginning of the task. --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

