How? Why? Production Woes

So, I can migrate without error in development, but when I migrate in
production I get what’s below. The gems are the same, rails is the
same version…what am I missing?

[[email protected] current]# rake db:migrate RAILS_ENV=production --trace
(in /apps/listjutsu/releases/20080909133505)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
uninitialized constant User::Authentication
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/
dependencies.rb:492:in const_missing' /apps/listjutsu/releases/20080909133505/app/models/user.rb:4 /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in require' /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/ dependencies.rb:509:inrequire’
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/
dependencies.rb:354:in new_constants_in' /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/ dependencies.rb:509:inrequire’
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/
dependencies.rb:101:in require_or_load' /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/ dependencies.rb:260:inload_missing_constant’
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/
dependencies.rb:467:in const_missing' /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/ dependencies.rb:479:inconst_missing’
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/
inflector.rb:283:in constantize' /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/ core_ext/string/inflections.rb:143:inconstantize’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
observer.rb:157:in observed_class' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/ observer.rb:183:inobserved_classes’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
observer.rb:166:in initialize' /usr/lib/ruby/1.8/singleton.rb:95:innew’
/usr/lib/ruby/1.8/singleton.rb:95:in instance' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/ observer.rb:38:ininstantiate_observers’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
observer.rb:36:in each' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/ observer.rb:36:ininstantiate_observers’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/
dispatcher.rb:26:in define_dispatcher_callbacks' /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/ callbacks.rb:177:incall’
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/
callbacks.rb:177:in evaluate_method' /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/ callbacks.rb:161:incall’
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/
callbacks.rb:90:in run' /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/ callbacks.rb:90:ineach’
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/
callbacks.rb:90:in send' /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/ callbacks.rb:90:inrun’
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/
callbacks.rb:272:in run_callbacks' /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:483:insend’
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:483:in
prepare_dispatcher' /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:151:inprocess’
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:93:in
send' /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:93:inrun’
/apps/listjutsu/releases/20080909133505/config/environment.rb:13
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/
dependencies.rb:509:in require' /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/ dependencies.rb:354:innew_constants_in’
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/
dependencies.rb:509:in require' /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/tasks/misc.rake:3 /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:incall’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in execute' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:ineach’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in execute' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:ininvoke_with_call_chain’
/usr/lib/ruby/1.8/thread.rb:135:in synchronize' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:ininvoke_with_call_chain’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:518:in
invoke_prerequisites' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:ineach’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in send' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:ineach’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:515:in
invoke_prerequisites' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:507:ininvoke_with_call_chain’
/usr/lib/ruby/1.8/thread.rb:135:in synchronize' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:ininvoke_with_call_chain’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in invoke' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:ininvoke_task’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:ineach’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:instandard_exception_handling’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:inrun’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in
standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:inrun’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31
/usr/bin/rake:19:in `load’
/usr/bin/rake:19

Did you try to:
rake db:migrate VERSION=0
rake db:migrate

You will probably face the same problem…

Rodrigo.

Anyway, you should check this one:

/apps/listjutsu/releases/20080909133505/app/models/user.rb:4

Rodrigo.

Actually, yes I tried running the migration from the beginning with a
clean db (and backwards for good measure) and it works just fine and
dandy in development. * scratches head *

On Sep 9, 10:08 am, Rodrigo Rosenfeld R. [email protected]

Alright, nevermind. Apparently for whatever reason the
restful_authentication plugin directory didn’t make it into my git
repo. >:-(

Jeremy wrote:

Alright, nevermind. Apparently for whatever reason the
restful_authentication plugin directory didn’t make it into my git
repo. >:-(

I had the same problem.

I probably originally used:
./script/plugin install
git://github.com/technoweenie/restful-authentication.git

In any case, my restful_authentication folder was there in the project,
but it’s contents for whatever reason were silently never added to the
repo.

Don’t look at the rest of the error message, here is your problem:

uninitialized constant User::Authentication

I am pretty sure, during development you have mispelled User or
authentication, and it only appears now when you want to run a migration
on a fresh server.

Use the grep tool to hunt it down in your code.


Video tutorial training by screencasts at http://www.digiprof.fr

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs