I have a really odd bug that I can't work out.

I have a pair of rake tasks for bootstrapping my database with basic
initial data that look a bit like this....

task :default_user => :environment do
  u = User.new( :login => 'foo', :password =>
'******', :password_confirmation => '******', :email =>
'[email protected]' )
  u.is_admin = true
  u.save
end

task :default_sections => :environment do
  s = Section.new( :name => 'Overview', :address =>
'productions', :active => false )
  s.save
end

If I run either of these locally they run just fine.

If I try and run them remotely then the default_sections target works
fine, but the default_user target throws the following error (just the
relevant bit of the trace)...

  rake aborted!
  uninitialized constant User
  ...
  /disk1/home/slugs/153392_f71a4b1_0b00/mnt/lib/tasks/bootstrap.rake:4
  ...


I can't see why the class User would be useable when I run these
locally, but not when run remotely, and why the default_sections task
works just fine in all situations.

The User class is using acts_as_authentic, might this be causing an
issue with it?

Thanks in advance for any help or pointers you might have.  This is
starting to drive me a little nuts as I suspect I'm missing something
obvious.

Paul

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" 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/heroku?hl=en.

Reply via email to