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 --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 Meyer | | email : pam-1sEOgp2Wo8Qdnm+yROfE0A@public.gmane.org | `========================'' --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I wrote reload! and it did reloaded the configuration but not the edited source file. On 1 Mrz., 13:08, Pierre-Alexandre Meyer <p...-1sEOgp2Wo8Qdnm+yROfE0A@public.gmane.org> wrote:> 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 Meyer | > | email : p...-1sEOgp2Wo8Qdnm+yROfE0A@public.gmane.org | > `========================''--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
"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 On Mar 1, 1:48 pm, "stemey" <s.me...-f4nibZ0D32L2O37bPCeAEBvVK+yQ3ZXh@public.gmane.org> wrote:> I wrote reload! and it did reloaded the configuration but not the > edited source file.--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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" <s.meyer-f4nibZ0D32L2O37bPCeAEBvVK+yQ3ZXh@public.gmane.org> Sent by: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 01/03/2007 04:04 AM Please respond to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To "Ruby on Rails: Talk" <rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 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 --~--~---------~--~----~------------~-------~--~----~ 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 For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I have the same issue , did you find a solution ? -- Posted via http://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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---