开发者

Rails Webrick: Configure what directories are watched for changes

开发者 https://www.devze.com 2023-03-07 11:23 出处:网络
At the moment I\'m having to restart the server if I change files in the lib/ and app/helpers/ directories. Is there a way to configure eith开发者_Python百科er Rails or Webrick such that it hotswaps t

At the moment I'm having to restart the server if I change files in the lib/ and app/helpers/ directories. Is there a way to configure eith开发者_Python百科er Rails or Webrick such that it hotswaps the files in those directories as well?


In your config/application.rb:

config.autoload_paths += %W(#{config.root}/lib #{config.root}/app/helpers)

There should be a commented line which explains what autoload_paths is for.

0

精彩评论

暂无评论...
验证码 换一张
取 消