I've using nginx + unicorn at production
And I've got following error at log/unicorn.log but it's work fine at localhost (in both environments development and production)
I, [2012-07-01T19:20:39.905978 #15422] INFO -- : Refreshing Gem list
E, [2012-07-01T19:20:40.526582 #15418] ERROR -- : uninitialized constant ApplicationController::CanCan (NameError)
for line
rescue_from CanCan::AccessDenied do |exception|
I have gem 'cancan' in Gemfile (below gem 'rails'). Cancan gem is installed. I've tried both versions 1.6.7 and 1.6.8
current$ bundle exec gem list cancan
*** LOCAL GEMS ***
cancan (1.6.7)
current$ bundle exec rails -v
Rails 3.2.3
current$ ruby -v
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux]
current$ bundle exec rails c production
Loading production environment (Rails 3.2.3)
1.9.3p125 :001 > CanCan
=> CanCan
1.9.3p125 :002 >
What can be wrong with my configuration?
upd:
require 'cancan'
in application_controller
cause error No such file to load -- cancan (LoadError)