I'm getting a 500 error when I go to /users/sign_in (or any other devise page).
This is all 开发者_运维百科the log says:
Started GET "/users/sign_in" for 67.161.236.149 at Mon Jun 13 02:51:47 +0000 2011
Processing by Devise::SessionsController#new as HTML
Completed 500 Internal Server Error in 10ms
ActiveRecord::StatementInvalid (Could not find table 'users'):
Started GET "/users/sign_out" for 67.161.236.149 at Mon Jun 13 10:40:25 +0000 2011
Processing by Devise::SessionsController#destroy as HTML
Completed 500 Internal Server Error in 135ms
NameError (undefined local variable or method `root_path' for #<Devise::SessionsController:0x605f360>):
What is going wrong?
This looks suspicious:
ActiveRecord::StatementInvalid (Could not find table 'users'):
Have you run db:migrate
since creating your User model?
Also,
NameError (undefined local variable or method `root_path' for #<Devise::SessionsController:0x605f360>)
suggests that you don't have a root path configured. This is something in routes.rb that matches requests to www.yourdomain.com/. You could use something like
root :to => "pages#home"
which would direct any request to www.yourdomain.com/ to the home action of the pages controller.
精彩评论