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:

  1. Make sure FooModule is in the lib / foo_module.rb .
  2. Use need_dependency for your external library requirement in lib / foo_module.rb .

Both of these steps are necessary, and no other is necessary.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -