Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
目前,如果我更改 lib/ 和 app/helpers/ 目录中的文件,我必须重新启动服务器。有没有办法配置 Rails 或 Webrick,以便它也可以热交换这些目录中的文件?
在你的config/application.rb:
config/application.rb
config.autoload_paths += %W(#{config.root}/lib #{config.root}/app/helpers)
应该有一个注释行来解释autoload_paths它的用途。
autoload_paths