# Reload! doesn't work

**URL:** <https://www.ruby-forum.com/t/reload-doesnt-work/139446>\
**Category:** Rails\
**Created:** [June 4, 2008, 12:39am UTC](https://www.ruby-forum.com/t/reload-doesnt-work/139446 "2008-06-04T00:39:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![itkin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/22d042/32.png) [@itkin](https://www.ruby-forum.com/u/itkin)\
**Post date:** [June 4, 2008, 12:39am UTC](https://www.ruby-forum.com/t/reload-doesnt-work/139446/1 "2008-06-04T00:39:01Z")

</div>

Hi!

I’d like not to have to quit an re-enter into rails console when i  
change somethings in my model, the instruction reload! lead me to  
systematic “unknown method” error does anybody faced to this kind of  
problem??

Below an example:NoMethodError: undefined method `events’ for  
#Ad:0xb776782c

---

<div class="post-metadata">

**Author:** ![itkin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/22d042/32.png) [@itkin](https://www.ruby-forum.com/u/itkin)\
**Post date:** [June 4, 2008, 12:59am UTC](https://www.ruby-forum.com/t/reload-doesnt-work/139446/2 "2008-06-04T00:59:31Z")

</div>

On Jun 3, 11:39 pm, Nicolas I. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Hi!
> 
> I’d like not to have to quit an re-enter into rails console when i  
> change somethings in my model, the instruction reload! lead me to  
> systematic “unknown method” error does anybody faced to this kind of  
> problem??

When you do use reload! it pretty much means that you can’t use  
anything you wrote before you ran reload!. Reload effectively guts  
Activerecord classes, so if you have say an instance of Person and  
reload! then that instance remains an instance of the old Person  
class, but that class has had all its methods removed and so is a bit  
useless.

Fred

---

<div class="post-metadata">

**Author:** ![itkin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/22d042/32.png) [@itkin](https://www.ruby-forum.com/u/itkin)\
**Post date:** [June 4, 2008, 1:06am UTC](https://www.ruby-forum.com/t/reload-doesnt-work/139446/3 "2008-06-04T01:06:41Z")

</div>

Fred : OK thank i understand now… any idea to debug an test code  
quickly so ?

---

<div class="post-metadata">

**Author:** ![itkin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/22d042/32.png) [@itkin](https://www.ruby-forum.com/u/itkin)\
**Post date:** [June 4, 2008, 2:43am UTC](https://www.ruby-forum.com/t/reload-doesnt-work/139446/4 "2008-06-04T02:43:09Z")

</div>

On Wed, Jun 4, 2008 at 8:36 AM, nico Itkin  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Fred : OK thank i understand now… any idea to debug an test code  
> quickly so ?

Learn to type faster?

–  
Appreciated my help?  
Recommend me on Working With Rails  
[http://workingwithrails.com/person/11030-ryan-bigg](http://workingwithrails.com/person/11030-ryan-bigg)
