简体   繁体   English

除非服务器重新启动,否则 Rails 文件不会更新

[英]Rails files not updating unless server restart

I am working on a Ruby on Rails project, and each time I want my changes to take effect (views, controllers, anything really) I am forced to close the server and restart it.我正在处理一个 Ruby on Rails 项目,每次我希望我的更改生效(视图、控制器、任何真正的东西)时,我都被迫关闭服务器并重新启动它。 I tried to find a solution to this but Googling it didn't help me at all.我试图找到解决方案,但谷歌搜索它根本没有帮助我。 Does anyone know how to fix this issue?有谁知道如何解决这个问题?

Go to config/environments/development.rb and add these two configs or change them to false转到config/environments/development.rb并添加这两个配置或将它们更改为 false

config.cache_classes = false
config.eager_load = false

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

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