【问题标题】:config/environments/development.rb:30:in `<top (required)>': undefined local variable or method `config' for main:Object (NameError)config/environments/development.rb:30:in `<top (required)>': undefined local variable or method `config' for main:Object (NameError)
【发布时间】:2017-12-05 01:28:11
【问题描述】:

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

rails g active_admin:install

我收到如下错误消息:

用户/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 'const_get':未初始化的常量 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 'block in constantize' 来自 /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 '每个'

我该如何解决这个问题?

【问题讨论】:

    标签: ruby-on-rails ruby macos


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-08-03
      • 1970-01-01
      • 2017-05-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多