NameError in Devise/sessionsController#new

I created a sample application. Added devise in it, it works fine.

Then added cancan gem into it.

Created an ability class. define some permissions.

Then added line


to the Application Controller, after that when i go to the page it gave the following error,

NameError in Devise/sessionsController#new uninitialized constant Session Rails.root: /home/nazar/rails_projects/sample_can

Please help me, i can not solve this issue.

Hi i am getting the same issue, can you tell me if you got a solution for this?