uninitialized constant ApplicationController::CanCan (NameError) #918

Closed
mostafahussein opened this Issue Aug 14, 2013 · 1 comment

Comments

Projects
None yet
1 participant

My application runs normally on development environment but I am getting the following error when I try to run > rails server -e production
I have searched for this and I found answers about restarting unicorn but I don't have unicorn in my application, what can I do to fix it ?
/app/controllers/application_controller.rb:6:inclass:ApplicationController': uninitialized constant ApplicationController::CanCan (NameError)
from /home/dexter/Desktop item/Triton/app/controllers/application_controller.rb:1:in <top (required)>' from /var/lib/gems/1.9.1/gems/ckeditor-4.0.4/app/controllers/ckeditor/application_controller.rb:1:in<top (required)>'
from /var/lib/gems/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:439:in block (2 levels) in eager_load!' from /var/lib/gems/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:438:ineach'
from /var/lib/gems/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:438:in block in eager_load!' from /var/lib/gems/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:436:ineach'
from /var/lib/gems/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:436:in eager_load!' from /var/lib/gems/1.9.1/gems/railties-3.2.12/lib/rails/application/railties.rb:8:ineach'
from /var/lib/gems/1.9.1/gems/railties-3.2.12/lib/rails/application/railties.rb:8:in all' from /var/lib/gems/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:434:ineager_load!'
from /var/lib/gems/1.9.1/gems/railties-3.2.12/lib/rails/application/finisher.rb:53:in block in <module:Finisher>' from /var/lib/gems/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:30:ininstance_exec'
from /var/lib/gems/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:30:in run' from /var/lib/gems/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:55:inblock in run_initializers'
from /var/lib/gems/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:54:in each' from /var/lib/gems/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:54:inrun_initializers'
from /var/lib/gems/1.9.1/gems/railties-3.2.12/lib/rails/application.rb:136:in initialize!' from /var/lib/gems/1.9.1/gems/railties-3.2.12/lib/rails/railtie/configurable.rb:30:inmethod_missing'
from /home/dexter/Desktop item/Triton/config/environment.rb:5:in <top (required)>' from /home/dexter/Desktop item/Triton/config.ru:3:inblock in

'
from /var/lib/gems/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in instance_eval' from /var/lib/gems/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:ininitialize'
from /home/dexter/Desktop item/Triton/config.ru:in new' from /home/dexter/Desktop item/Triton/config.ru:in'
from /var/lib/gems/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in eval' from /var/lib/gems/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:inparse_file'
from /var/lib/gems/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:200:in app' from /var/lib/gems/1.9.1/gems/railties-3.2.12/lib/rails/commands/server.rb:46:inapp'
from /var/lib/gems/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:304:in wrapped_app' from /var/lib/gems/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:254:instart'
from /var/lib/gems/1.9.1/gems/railties-3.2.12/lib/rails/commands/server.rb:70:in start' from /var/lib/gems/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:55:inblock in <top (required)>'
from /var/lib/gems/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:50:in tap' from /var/lib/gems/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:50:in<top (required)>'
from script/rails:6:in require' from script/rails:6:in'`

sorry a newbies fault , gem 'cancan' and gem 'devise' should be under gem 'rails' not in the assets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment