![](/img/trans.png)
[英]rails generate rspec:install config/environments/development.rb:1:in `<top (required)>': undefined method `configure'
[英]config/environments/development.rb:30:in `<top (required)>': undefined local variable or method `config' for main:Object (NameError)
我正在嘗試使用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':未初始化的常量來自/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的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:266的“阻止常量化”:每個'
我該如何解決?
您需要照顧Active Admin gem的依賴項。
首先需要創建AdminUser模型。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.