I've got a few classes in lib/ which are not reloadable (due to their internal structure, its a jruby application). How can I tell rails to not reload these after each and every request?开发者_JAVA技巧
Thanks!
After looking at this post about adding reloadability to plugins, I think what you could try doing is adding the file your class resides in to ActiveSupport::Dependencies.load_once_paths
Add something like this in config/environments/development.rb:
ActiveSupport::Dependencies << (Rails.root + "lib/your_class.rb").to_s
The trade off is that you will need to restart your script/server
process every time you change one of the files.
精彩评论