I am developing a ruby ​​module that I include in my rails application. I want it to restart automatically when it changes. I did an extensive Google search, and looked at various issues here that discuss this, but they all seem outdated or incorrect.
How to get an external module to reload in rails when changing it? I tried adding his name to ActiveSupport::Dependencies.unloadable_constants , but after I typed reload! in the console, I can no longer refer to this character without NameError: uninitialized constant foo , even if I do another require 'foo_module' . Does anyone know how to make this work?
Note: here is one possible duplicate , but pay attention to the comments on the “answer” that it never solved the problem for the modules. There is also this question , which has a dead link in the answer, and finally this , which also doesn’t solve it.
ruby-on-rails
Peter Jan 24 '10 at 23:55 2010-01-24 23:55
source share