为什么 config.cache_classes = false 不起作用?
我是 RoR 新手,目前需要为 redmine 开发一个插件(到目前为止这不是问题)。因此我设置了 ruby 1.8.7、redmine 1.0.5 和 radrails 2。ruby 解释器在 radrails 中设置为默认值,我还可以启动/停止 redmine 服务器(mongrel、webrick、lightTPD - 都工作正常)。
我真正崩溃的问题是我没有让“config.cache_classes = false”工作(开发环境已设置)。所以当我保存某事时我总是必须重新启动服务器。 - 这非常烦人:(
顺便说一句。我必须承认我正在 Windows 上尝试这个...
提前感谢, 克里斯坦
I'm new to RoR and currently need to develop a plugin for redmine (which is not the issue so far). Therefore I setup ruby 1.8.7, redmine 1.0.5 and radrails 2. The ruby interpreter is set as default in radrails and I can also start/stop the redmine server (mongrel, webrick, lightTPD - all work fine).
The problem that I'm really crashing on is that I don't get the "config.cache_classes = false" to work (development environment is set). So I always have to restart the server when I saved sth. - and this is very annoying :(
Btw. I have to admit that I'm trying this on windows...
Thanks in advance,
Christan
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Rails 不会重新加载插件(供应商/插件)中的类。因此,即使它重新加载应用程序/类,它也会保留旧版本,直到您重新启动服务器。
我有一个与开发人员中的乘客一起使用的脚本,用于监视供应商/插件的更改并自动重新启动乘客。
http://theadmin.org/articles/2010/ 06/17/rails-plugin-reloading-with-passenger/
Rails doesn't reload classes in plugins (vendor/plugins). So even though it's reloading the app/ classes, it's keeping around your older versions until you restart the server.
I have a script I use with passenger in developer that watches for changes in vendor/plugins and restart passenger automatically.
http://theadmin.org/articles/2010/06/17/rails-plugin-reloading-with-passenger/