Rake on Rails 3 问题 [英] Rake on Rails 3 problem
本文介绍了Rake on Rails 3 问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我将 Rails 2.3 应用程序移至 Rails 3.该应用程序实际上运行良好,但我对 rake 任务有疑问.看起来环境文件中的配置没有正确初始化.我得到的错误是:
I moved a Rails 2.3 application to Rails 3. The application actually works perfectly, but I have issue with rake tasks. It looks like the config in the environment file is not initialized correctly. the error I get is:
rake aborted!
undefined method `cache_classes=' for #<Hash:0x3c3e850>
/var/www/apps/nzar3/config/environments/development.rb:9
.....
环境文件是干净的,它可以工作.这里的环境/development.rb
The environment file is clean, and it works. Here the environments/development.rb
config.cache_classes = false
config.whiny_nils = true
config.action_controller.consider_all_requests_local = true
config.action_view.debug_rjs = true
config.action_controller.perform_caching = false
config.active_support.deprecation = :log
config.action_dispatch.best_standards_support = :builtin
有什么线索吗?
推荐答案
我也遇到了这个问题,与安装的 cache_fu 插件有关.删除 cache_fu 使问题消失.
I had this problem also, it was related to the cache_fu plugin being installed. Removing cache_fu made the issue go away.
这篇关于Rake on Rails 3 问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文