How to reload classes in lib/ without restarting server

Hi all,

We have a class extending a class from a plugin. We didn’t know where to
put it exactly, but the lib/ folder seemed to make sense.

Problem is, it doesn’t reload the file for each request, so it makes
development mode difficult (have to restart the webserver with every
request).

Any advice on how to make it reload?

Thanks in advance!

Cameron

Cameron B. wrote:

Hi all,

We have a class extending a class from a plugin. We didn’t know where to
put it exactly, but the lib/ folder seemed to make sense.

Problem is, it doesn’t reload the file for each request, so it makes
development mode difficult (have to restart the webserver with every
request).

Any advice on how to make it reload?

Include Reloadable in your class definition.

class Example
include Reloadable
#…
end


Josh S.
http://blog.hasmanythrough.com

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs