Re: reload! doesn''t work

Frederick Cheung
Tue, 03 Jun 2008 22:58:36 -0000

On Jun 3, 11:39 pm, Nicolas Itkin
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
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
>
> Below an example:NoMethodError: undefined method `events'' for
> #<Ad:0xb776782c>
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com