【发布时间】:2014-06-16 18:44:13
【问题描述】:
我正在编写 RailsTutorial.org 书,但一直遇到错误。当我跑步时
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。这里是环境/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
如果您需要查看更多代码 sn-ps,请告诉我。任何帮助将不胜感激。
【问题讨论】:
-
显示文件environments/development.rb的内容
-
我刚刚编辑了帖子以包含 enviroment/development.rb 的内容
标签: ruby-on-rails ruby scaffold