我已经从GitHub克隆了一个项目,但是当我尝试运行rails server
时,它会抛出一个错误:
=> Booting WEBrick
=> Rails 4.2.4 application starting in development on http://localhost:3000
=> Run rails server -h for more startup options
=> Ctrl-C to shutdown server
[Simple Form] Simple Form is not configured in the application and will use the default values. Use rails generate simple_form:install to generate the Simple Form configuration.
Exiting
然后我尝试运行simple_form的安装,但同样出现了同样的错误
[Simple Form] Simple Form is not configured in the application and will use the default values. Use rails generate simple_form:install to generate the Simple Form configuration.
/home/andres/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.4/lib/active_support/inflector/methods.rb:261:in `const_get': uninitialized constant User (NameError)
from /home/andres/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.4/lib/active_support/inflector/methods.rb:261:in `block in constantize'
我在Rails 4.2.4安装中使用了版本3.2.0的gem,这可能导致错误?
答案 0 :(得分:1)
错误发生在您的路由文件中。可能" devise_for:用户"线。
您是否尝试设置Devise并且没有完全设置它?好像那样
检查https://github.com/plataformatec/devise以获取文档和设置说明