Rails无法配置simple_form gem

时间:2017-01-22 18:37:36

标签: ruby-on-rails rubygems simple-form

我正在尝试使用devise和simple_form启动一个新的rails应用程序。 将simple_form gem添加到我的gemfile并进行捆绑后,当我尝试通过从命令行运行rails generate simple_form:install来配置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.
~/.gem/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/inflector/methods.rb:261:in `const_get': uninitialized constant View (NameError)

有人知道发生了什么事吗?

1 个答案:

答案 0 :(得分:0)

这似乎只是一个警告。

底层错误是:~/.gem/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/inflector/methods.rb:261:in const_get':未初始化的常量视图(NameError)`

View是你的设计模型之一吗?如果是,它是否存在?

尝试跑步:

rails generate devise View