I am developing a Rails application where most of the non-application specific code was written inside various gems, including some Rails engines and some third-party stones, for which I am improving or fixing bugs.
gem 'mygem', path: File.expath_path('../../mygem', __FILE__)
Since most of the code in these gems is indeed part of the application, it still changes frequently. I would like to be able to use the Rails function, where the code is reloaded for each request during development (i.e. when config.cache_classes
is false), but by default this only runs in the normal application structure.
How to configure Rails to reload gem code for each request, as with application code?
source share