# Rails does not auto-re-read files in /lib in devel mode?

**URL:** <https://www.ruby-forum.com/t/rails-does-not-auto-re-read-files-in-lib-in-devel-mode/105722>\
**Category:** Rails\
**Created:** [June 1, 2007, 7:49pm UTC](https://www.ruby-forum.com/t/rails-does-not-auto-re-read-files-in-lib-in-devel-mode/105722 "2007-06-01T19:49:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cwd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/da6949/32.png) [@cwd](https://www.ruby-forum.com/u/cwd)\
**Post date:** [June 1, 2007, 7:49pm UTC](https://www.ruby-forum.com/t/rails-does-not-auto-re-read-files-in-lib-in-devel-mode/105722/1 "2007-06-01T19:49:15Z")

</div>

In development mode my understanding is that Rails re-reads every file  
each time a client does something in order to make sure any new code is  
implemented. Bt it doesn’t seem to do this with files in /lib - is there  
a way to make sure it does?

steve

---

<div class="post-metadata">

**Author:** ![cwd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/da6949/32.png) [@cwd](https://www.ruby-forum.com/u/cwd)\
**Post date:** [June 1, 2007, 7:59pm UTC](https://www.ruby-forum.com/t/rails-does-not-auto-re-read-files-in-lib-in-devel-mode/105722/2 "2007-06-01T19:59:47Z")

</div>

On Jun 1, 2007, at 7:49 PM, Steve R. wrote:

> In development mode my understanding is that Rails re-reads every file  
> each time a client does something in order to make sure any new  
> code is  
> implemented. Bt it doesn’t seem to do this with files in /lib - is  
> there  
> a way to make sure it does?

That’s not exact, by reductio ad absurdum :-).

Which version of Rails are you using?

– fxn

---

<div class="post-metadata">

**Author:** ![cwd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/da6949/32.png) [@cwd](https://www.ruby-forum.com/u/cwd)\
**Post date:** [June 1, 2007, 8:04pm UTC](https://www.ruby-forum.com/t/rails-does-not-auto-re-read-files-in-lib-in-devel-mode/105722/3 "2007-06-01T20:04:48Z")

</div>

On 6/1/07, Steve R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> In development mode my understanding is that Rails re-reads every file  
> each time a client does something in order to make sure any new code is  
> implemented. Bt it doesn’t seem to do this with files in /lib - is there  
> a way to make sure it does?

Rails 1.2 reloads files that are autoloaded. If you require the file  
specifically it won’t reload it.

–  
Rick O.  
[http://lighthouseapp.com](http://lighthouseapp.com)  
[http://weblog.techno-weenie.net](http://weblog.techno-weenie.net)  
[http://mephistoblog.com](http://mephistoblog.com)

---

<div class="post-metadata">

**Author:** ![cwd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/da6949/32.png) [@cwd](https://www.ruby-forum.com/u/cwd)\
**Post date:** [June 1, 2007, 8:13pm UTC](https://www.ruby-forum.com/t/rails-does-not-auto-re-read-files-in-lib-in-devel-mode/105722/4 "2007-06-01T20:13:15Z")

</div>

Rick O. wrote:

> On 6/1/07, Steve R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > In development mode my understanding is that Rails re-reads every file  
> > each time a client does something in order to make sure any new code is  
> > implemented. Bt it doesn’t seem to do this with files in /lib - is there  
> > a way to make sure it does?
> 
> Rails 1.2 reloads files that are autoloaded. If you require the file  
> specifically it won’t reload it.

Ok, that makes sense. I am indeed using require. Thankyou very much.

steve
