Automatically reload rails module -
I am developing a Ruby module that I include in my Rail app. I want to reload it automatically when it changes I have done wide goggles, and here are the various questions that we have discussed here, but they all seem to be wrong or wrong.
How do I get an external module to reload the rail when I change? I tried to add its name to ActiveSupport :: Dependencies.unloadable_constants , but in the console I reload! After typing , I need that symbol without the name: error: undefined constant foo , even if I do another then 'foo_module' is required . Does anyone know the way to do this work?
Note: Note the 'answer' in the comment here that it has never solved the problem for this module. There is also a dead link in the north, and in the end, which also does not solve it.
How do I do this:
- Make sure
FooModuleis in thelib / foo_module.rb. - Use
need_dependencyfor your external library requirement inlib / foo_module.rb.
Both of these steps are necessary, and no other is necessary.
Comments
Post a Comment