问题描述
|
转到/ users / sign_in(或其他任何设计页面)时,出现500错误。
这就是所有日志所说的:
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>):
怎么了?
解决方法
这看起来很可疑:
ActiveRecord::StatementInvalid (Could not find table \'users\'):
自创建用户模型以来,您是否已运行db:migrate
?
也,
NameError (undefined local variable or method `root_path\' for #<Devise::SessionsController:0x605f360>)
建议您没有配置根路径。这是route.rb中与请求匹配到www.yourdomain.com/的内容。您可以使用类似
root :to => \"pages#home\"
它将把对www.yourdomain.com/的任何请求定向到页面控制器的主页操作。