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?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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_pathsAdd something like this in config/environments/development.rb:
The trade off is that you will need to restart your
script/serverprocess every time you change one of the files.