Rails 3开发环境是否保持缓存,即使不进行缓存? [英] Rails 3 development environment keeps caching, even without caching on?
问题描述
我在开发人员模式下有一个 rails
3应用程序,运行webrick时不会加载我所做的任何更改。我三重检查了 development.rb
的设置,并确保我正在开发模式下运行。
i have a rails
3 app in dev mode that won't load any changes i make when its running webrick. i triple checked the settings for my development.rb
and made sure i am running in development mode.
config.cache_classes = false
config.action_controller.perform_caching = false
我还检查了我的 tmp
目录,以确保缓存文件夹为空-我尚未在站点上进行任何缓存并且从未打开过缓存。我猜测它是文件的加载问题。
i also checked my tmp
directory to make sure the cache folder is empty - i have yet to do any caching on the site and have never turned on caching. im guessing its a loading problem with the files.
我也在 webrick
上运行,然后安装了杂种,问题出在仍然存在。
also i was running on webrick
then installed mongrel and the problem still persists.
我猜测我遇到了配置问题,但是我看不到其他人发布过这样的问题。还有什么我想念的吗?
im guessing ive run into a config problem, bc i dont see anyone else posting such a prob. anything else im missing?
编辑:看来我的视图助手不是自动可加载的-默认情况下,助手不是应该可在Rails 3中重新加载吗?
it looks like my view helpers aren't auto loadable - aren't helpers by default supposed to be reloadable in rails 3?
推荐答案
我也有类似的经历,但是我不认为这与实际的帮助程序类有关,而与我所做的任何事情有关写在 lib /
目录下。如果必须使用 require'some_class'
语句,则应将其切换为:
I've had a similar experience, but I don't believe it was with an actual helper class, it was with anything I wrote under the lib/
directory. If you've had to use a require 'some_class'
statement, then you should switch it to:
require_dependency 'some_class'
对我来说就像一种魅力。
Worked like a charm for me.
这篇关于Rails 3开发环境是否保持缓存,即使不进行缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!