plataformatec/devise — Issue #1547:  uninitialized constant Devise::SessionsController (NameError)
Author: akeelahmedqureshi
Created: 2012-01-04 13:35:52+00:00
State: open

Hello
i am trying to override devise session controller it's working fine with development mode but in production mode it's gives error

env:

rails 2.3.8
ruby 1.8.7
warden 0.10.7
devise 1.0.9

routes setting

map.devise_for :users, :path_names => { :sign_in => '/login', :sign_out => '/logout' }
map.new_user_session 'login', :controller => 'users/sessions', :action => 'new', :conditions => { :method => :get }
map.user_session 'login', :controller => 'users/sessions', :action => 'create', :conditions => { :method => :post }
map.destroy_user_session 'logout', :controller => 'users/sessions', :action => 'destroy', :conditions => { :method => :get }
map.new_user_registration 'sign_up', :controller => 'users/registrations', :action => 'new', :conditions => { :method => :get }
map.user_registration 'sign_up', :controller => 'users/registrations', :action => 'create', :conditions => { :method => :post }
map.new_user_password '/password/new', :controller => 'users/passwords', :action => 'new', :conditions => { :method => :get }

gives error:--

cis@CISM121:~/ake/inex$ ruby script/server -e production
=> Booting WEBrick
=> Rails 2.3.8 application starting on http://0.0.0.0:3000
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:443:in `load_missing_constant': uninitialized constant Devise::SessionsController (NameError)
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:80:in `const_missing'
from /home/cis/ake/inex/app/controllers/users/sessions_controller.rb:1
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:158:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:265:in `require_or_load'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:224:in `depend_on'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:136:in `require_dependency'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:414:in `load_application_classes'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:413:in `each'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:413:in `load_application_classes'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:411:in `each'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:411:in `load_application_classes'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:197:in `process'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:113:in `send'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:113:in `run'
from /home/cis/Oliver_Projects/ake/inex/config/environment.rb:46
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/commands/server.rb:84
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from script/server:3

please help me and let me know if you need anything else