# How to reload classes in lib/ without restarting server

**URL:** <https://www.ruby-forum.com/t/how-to-reload-classes-in-lib-without-restarting-server/100014>\
**Category:** Rails\
**Created:** [July 26, 2006, 6:43pm UTC](https://www.ruby-forum.com/t/how-to-reload-classes-in-lib-without-restarting-server/100014 "2006-07-26T18:43:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cdb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/eb8c5e/32.png) [@cdb](https://www.ruby-forum.com/u/cdb)\
**Post date:** [July 26, 2006, 6:43pm UTC](https://www.ruby-forum.com/t/how-to-reload-classes-in-lib-without-restarting-server/100014/1 "2006-07-26T18:43:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cdb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/eb8c5e/32.png) [@cdb](https://www.ruby-forum.com/u/cdb)\
**Post date:** [July 26, 2006, 7:24pm UTC](https://www.ruby-forum.com/t/how-to-reload-classes-in-lib-without-restarting-server/100014/2 "2006-07-26T19:24:00Z")

</div>

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](http://blog.hasmanythrough.com)
