Rails 3 Devise or Authlogic - Production Env Mysteriously Can't See Gem? Works on Dev -


this problem easy solve somehow cannot find solution.

this happens both authlogic , devise. have been banging head against wall long ripped out authlogic , restarted devise -- experience same problem.

on dev fine.

however, when production, whenever try rake db:seed or run console. shows me restarting server , gemfile.

why can't production see gem? seems able see other gems fine.

the gem see github version -- recommended fix not work me. same result default version, , forcing specific version.

the fact both authlogic , devise have same problem seems indicate there problem config on production? other gemfile?

dev - rails 3.0.4, 1.9.2p136 prod - rails 3.0.4, 1.9.2p0

last resort upgrading ruby match, doubt problem , lot of work reasons won't go here.

ops@lightserve2:/home/proj/current$ touch tmp/restart.txt   ops@lightserve2:/home/proj/current$ r c /home/darkserve/releases/20110217175218/config/initializers/devise.rb:3:in `<top (required)>': uninitialized constant devise (nameerror)     /home/ops/shared/bundle/ruby/1.9.1/gems/railties-3.0.4/lib/rails/engine.rb:201:in `block (2 levels) in <class:engine>'     /home/ops/shared/bundle/ruby/1.9.1/gems/railties-3.0.4/lib/rails/engine.rb:200:in `each'     /home/ops/shared/bundle/ruby/1.9.1/gems/railties-3.0.4/lib/rails/engine.rb:200:in `block in <class:engine>'     /home/ops/shared/bundle/ruby/1.9.1/gems/railties-3.0.4/lib/rails/initializable.rb:25:in `instance_exec'     /home/ops/shared/bundle/ruby/1.9.1/gems/railties-3.0.4/lib/rails/initializable.rb:25:in `run'     /home/ops/shared/bundle/ruby/1.9.1/gems/railties-3.0.4/lib/rails/initializable.rb:50:in `block in run_initializers'     /home/ops/shared/bundle/ruby/1.9.1/gems/railties-3.0.4/lib/rails/initializable.rb:49:in `each'     /home/ops/shared/bundle/ruby/1.9.1/gems/railties-3.0.4/lib/rails/initializable.rb:49:in `run_initializers'     /home/ops/shared/bundle/ruby/1.9.1/gems/railties-3.0.4/lib/rails/application.rb:134:in `initialize!'     /home/ops/shared/bundle/ruby/1.9.1/gems/railties-3.0.4/lib/rails/application.rb:77:in `method_missing'     /home/darkserve/releases/20110217175218/config/environment.rb:5:in `<top (required)>'     /home/ops/shared/bundle/ruby/1.9.1/gems/railties-3.0.4/lib/rails/application.rb:103:in `require_environment!'     /home/ops/shared/bundle/ruby/1.9.1/gems/railties-3.0.4/lib/rails/commands.rb:22:in `<top (required)>'     script/rails:6:in `require'     script/rails:6:in `<main>'    ops@lightserve2:/home/darkserve/current$ cat gemfile.lock  git   remote: http://github.com/jonasnielsen/nifty-generators.git   revision: 432d05d55b55e030d6c16b9d71b392181bca45f8   specs:     nifty-generators (0.4.3)  git   remote: http://github.com/plataformatec/devise.git   revision: 7113beac81a12da06be2d08bbfaec79017e9fdbf   specs:     devise (1.2.rc)       bcrypt-ruby (~> 2.1.2)       orm_adapter (~> 0.0.3)       warden (~> 1.0.3)  gem   remote: http://rubygems.org/   specs:     aaronh-chronic (0.3.9)     abstract (1.0.0)     actionmailer (3.0.4)       actionpack (= 3.0.4)       mail (~> 2.2.15)     actionpack (3.0.4)       activemodel (= 3.0.4)       activesupport (= 3.0.4)       builder (~> 2.1.2)       erubis (~> 2.6.6)       i18n (~> 0.4)       rack (~> 1.2.1)       rack-mount (~> 0.6.13)       rack-test (~> 0.5.7)       tzinfo (~> 0.3.23)     activemodel (3.0.4)       activesupport (= 3.0.4)       builder (~> 2.1.2)       i18n (~> 0.4)     activerecord (3.0.4)       activemodel (= 3.0.4)       activesupport (= 3.0.4)       arel (~> 2.0.2)       tzinfo (~> 0.3.23)     activeresource (3.0.4)       activemodel (= 3.0.4)       activesupport (= 3.0.4)     activesupport (3.0.4)     arel (2.0.8)     bcrypt-ruby (2.1.4)     builder (2.1.2)     capistrano (2.5.19)       highline       net-scp (>= 1.0.0)       net-sftp (>= 2.0.0)       net-ssh (>= 2.0.14)       net-ssh-gateway (>= 1.0.0)     crack (0.1.8)     erubis (2.6.6)       abstract (>= 1.0.0)     foreigner (0.9.1)     haml (3.0.25)     haml-rails (0.3.4)       actionpack (~> 3.0)       activesupport (~> 3.0)       haml (~> 3.0)       railties (~> 3.0)     highline (1.6.1)     hpricot (0.8.3)     httparty (0.7.4)       crack (= 0.1.8)     i18n (0.5.0)     json (1.5.1)     mail (2.2.15)       activesupport (>= 2.3.6)       i18n (>= 0.4.0)       mime-types (~> 1.16)       treetop (~> 1.4.8)     mash (0.1.1)     mime-types (1.16)     mocha (0.9.12)     mysql2 (0.2.6)     net-scp (1.0.4)       net-ssh (>= 1.99.1)     net-sftp (2.0.5)       net-ssh (>= 2.0.9)     net-ssh (2.1.0)     net-ssh-gateway (1.0.1)       net-ssh (>= 1.99.1)     nokogiri (1.4.4)     oauth (0.4.4)     orm_adapter (0.0.4)     polyglot (0.3.1)     rack (1.2.1)     rack-mount (0.6.13)       rack (>= 1.0.0)     rack-test (0.5.7)       rack (>= 1.0)     rails (3.0.4)       actionmailer (= 3.0.4)       actionpack (= 3.0.4)       activerecord (= 3.0.4)       activeresource (= 3.0.4)       activesupport (= 3.0.4)       bundler (~> 1.0)       railties (= 3.0.4)     railties (3.0.4)       actionpack (= 3.0.4)       activesupport (= 3.0.4)       rake (>= 0.8.7)       thor (~> 0.14.4)     rake (0.8.7)     ruby-freshbooks (0.4.0)       builder (>= 2.1.2)       httparty (>= 0.5.0)     ruby_parser (2.0.5)       sexp_processor (~> 3.0)     sexp_processor (3.0.5)     simple_form (1.3.1)     thor (0.14.6)     treetop (1.4.9)       polyglot (>= 0.3.1)     tzinfo (0.3.24)     warden (1.0.3)       rack (>= 1.0.0)     whenever (0.6.2)       aaronh-chronic (>= 0.3.9)       activesupport (>= 2.3.4)     yammer4r (0.1.5)       json (>= 1.1.7)       mash (>= 0.0.3)       oauth (>= 0.3.5)  platforms   ruby  dependencies   bcrypt-ruby   capistrano   devise!   foreigner   haml   haml-rails   hpricot   mocha   mysql2   nifty-generators!   nokogiri   rails (= 3.0.4)   ruby-freshbooks   ruby_parser   simple_form   whenever   yammer4r 

any chance that....

  1. you have not run bundle in production environment (less likely)
  2. you have gemfile divided groups - see this

gemfile

group :development      gem 'devise' end 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -