导轨产生支架错误 [英] rails generate scaffold error
本文介绍了导轨产生支架错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在研究RailsTutorial.org上的书,并且不断遇到错误.当我运行
I'm working on the RailsTutorial.org book and I keep hitting an error. When I run
rails generate scaffold User name:string email:string
我遇到以下错误:
/Users/Cody/Development/rails_projects/demo_app/config/environments/development.rb:1:in `<top (required)>': undefined method `configure' for #<DemoApp::Application:0x007fdcea90ae10> (NoMethodError)
我正在运行Ruby 2.0.0和Rails 4.0.4.这是enviroments/development.rb
I'm running Ruby 2.0.0 and Rails 4.0.4. Here is the contents of enviroments/development.rb
Rails.application.configure do
config.cache_classes = false
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
config.action_mailer.raise_delivery_errors = false
config.active_support.deprecation = :log
config.active_record.migration_error = :page_load
config.assets.debug = true
config.assets.raise_runtime_errors = true
end
如果您需要查看更多代码段,请告诉我.任何帮助将不胜感激.
Please let me know if you need to see any more of the code snippets. Any help would be greatly appreciated.
推荐答案
尝试:
DemoApp::Application.configure do
config.cache_classes = false
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
config.action_mailer.raise_delivery_errors = false
config.active_support.deprecation = :log
config.active_record.migration_error = :page_load
config.assets.debug = true
config.assets.raise_runtime_errors = true
end
这篇关于导轨产生支架错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文