# Console does not reload

**URL:** <https://www.ruby-forum.com/t/console-does-not-reload/87289>\
**Category:** Rails\
**Created:** [March 1, 2007, 1:05pm UTC](https://www.ruby-forum.com/t/console-does-not-reload/87289 "2007-03-01T13:05:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![stemey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e79b87/32.png) [@stemey](https://www.ruby-forum.com/u/stemey)\
**Post date:** [March 1, 2007, 1:05pm UTC](https://www.ruby-forum.com/t/console-does-not-reload/87289/1 "2007-03-01T13:05:16Z")

</div>

I start a ruby on rails console. First I execute "require ‘managers/  
x\_manager’ then I do something with the loaded class. After changing  
the source of the class it is not reloaded. How do I activate the  
changes without restarting the console?

Thanks,  
Stefan

---

<div class="post-metadata">

**Author:** ![stemey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e79b87/32.png) [@stemey](https://www.ruby-forum.com/u/stemey)\
**Post date:** [March 1, 2007, 1:49pm UTC](https://www.ruby-forum.com/t/console-does-not-reload/87289/2 "2007-03-01T13:49:21Z")

</div>

I wrote reload! and it did reloaded the configuration but not the  
edited source file.

---

<div class="post-metadata">

**Author:** ![stemey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e79b87/32.png) [@stemey](https://www.ruby-forum.com/u/stemey)\
**Post date:** [March 1, 2007, 2:50pm UTC](https://www.ruby-forum.com/t/console-does-not-reload/87289/3 "2007-03-01T14:50:33Z")

</div>

“reload!” only reloads controllers, models, routes and similar often-  
changing stuff. It does not reload everything - it depends on the  
directories and internal settings like ‘load\_paths’ and  
‘load\_once\_paths’. For instance, plugin code is not reloaded.

Where is the source file you want reloaded? Try this:

module MyStuff  
unloadable

# rest of my code …

end

The “unloadable” method explicitly tells Dependencies that this module  
is unloadable.

–  
M

---

<div class="post-metadata">

**Author:** ![stemey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e79b87/32.png) [@stemey](https://www.ruby-forum.com/u/stemey)\
**Post date:** [March 1, 2007, 1:09pm UTC](https://www.ruby-forum.com/t/console-does-not-reload/87289/4 "2007-03-01T13:09:16Z")

</div>

On Thu, Mar 01, 2007 at 04:04:24AM -0800, stemey wrote :

> How do I activate the changes without restarting the console?

Try reload!

–  
,========================.  
| Pierre-Alexandre M. |  
| email : removed\_email\_address@domain.invalid |  
`========================’

---

<div class="post-metadata">

**Author:** ![stemey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e79b87/32.png) [@stemey](https://www.ruby-forum.com/u/stemey)\
**Post date:** [March 1, 2007, 5:43pm UTC](https://www.ruby-forum.com/t/console-does-not-reload/87289/5 "2007-03-01T17:43:59Z")

</div>

Try \>reload!

Regards,  
Dave

* * *

Information and Educational Technology  
Kwantlen University College - 604-599-2120  
“So powerful is the light of unity that it can illuminate the whole  
earth.” --BahÃ¡'u’llÃ¡h

“stemey” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Sent by: removed\_email\_address@domain.invalid  
01/03/2007 04:04 AM  
Please respond to  
removed\_email\_address@domain.invalid

To  
“Ruby on Rails: Talk” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
cc

Subject  
[Rails] console does not reload

I start a ruby on rails console. First I execute "require ‘managers/  
x\_manager’ then I do something with the loaded class. After changing  
the source of the class it is not reloaded. How do I activate the  
changes without restarting the console?

Thanks,  
Stefan

---

<div class="post-metadata">

**Author:** ![stemey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e79b87/32.png) [@stemey](https://www.ruby-forum.com/u/stemey)\
**Post date:** [June 4, 2008, 12:49am UTC](https://www.ruby-forum.com/t/console-does-not-reload/87289/6 "2008-06-04T00:49:46Z")

</div>

I have the same issue , did you find a solution ?
