config / environments / development.rb:30:在`<top(required)=“”>&#39;:未定义的局部变量或方法`config&#39; for main:Object(NameError)

时间:2017-07-01 04:49:32

标签: ruby-on-rails ruby macos

我正在尝试使用Ruby on Rails安装active_admin。每次我输入:

rails g active_admin:install

我收到如下错误消息:

  

用户/ audreyjoanne / .rbenv /版本/ 2.4.0 / LIB /红宝石/宝石/ 2.4.0 /宝石/的ActiveSupport-5.0.4 / LIB / active_support /偏转器/ methods.rb:268:在   &#39; const_get&#39;:未初始化的常量AdminUser(NameError)来自   /Users/audreyjoanne/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.0.4/lib/active_support/inflector/methods.rb:268:in   &#39;阻止constantize&#39;从   /Users/audreyjoanne/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.0.4/lib/active_support/inflector/methods.rb:266:in   &#39;每个&#39;

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

你需要照顾Active Admin gem的依赖关系。
需要首先创建AdminUser模型。