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.
精彩评论