简体   繁体   English

宙斯不在Rails的模型文件中重新加载代码更改

[英]Zeus not reloading code changes in model files in Rails

I've recently discovered Zeus and it's fantastic really speeds up my feedback loop when developing it's just that when I'm making changes to my model like adding a new method Zeus doesn't restart and the new method isn't loaded. 我最近发现了宙斯(Zeus),在开发时确实可以加快我的反馈循环,这是因为当我对模型进行更改时,例如添加新方法,宙斯(Zeus)不会重新启动并且新方法也不会加载。

I'm not sure where to start debugging but I'm using Rails 4.0.2, ruby 2.0.0p353 and Rspec + Capybara for testing. 我不确定从哪里开始调试,但是我正在使用Rails 4.0.2,ruby 2.0.0p353和Rspec + Capybara进行测试。

Anyone have any ideas or help that would be fantastic. 任何人都有任何奇妙的想法或帮助。

Thanks a lot 非常感谢

If you are using unicorn this could be your problem. 如果您使用unicorn则可能是您的问题。 Try using thin instead 尝试改用thin

Zeus: Reloads models correctly when modifying callbacks and scopes, which is not always the case for servers with hot-reload, such as Unicorn. Zeus:在修改回调和作用域时,可以正确地重新加载模型,对于具有热重新加载的服务器(例如Unicorn)而言,情况并非总是如此。 It also reloads views when writing integration specs.( source ) 编写集成功能时,也重新加载了意见。( 来源

You may also need to reconfigure foreman. 您可能还需要重新配置领班。 Check this thread for information on foreman support with Zeus: https://github.com/burke/zeus/issues/92 检查此线程以获取有关宙斯对工长的支持的信息: https : //github.com/burke/zeus/issues/92

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM