Rails 4.0.0生产环境下控制台无法启动

17

上周我的服务器控制台运行良好。现在当我运行

rails console RAILS_ENV=production

我遇到了以下错误。

config.eager_load is set to nil. Please update your config/environments/*.rb files  accordingly:

* development - set it to false
* test - set it to false (unless you use a tool that preloads your test environment)
* production - set it to true

在我的production.rb文件中,我有以下这行代码:

config.eager_load = true

在开发环境下,Rails控制台可以在我的服务器上运行

1个回答

28

在生产模式下启动Rails控制台的命令:

rails console production

这是一个非常准确的射击!太棒了!! - Anwar

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接