See this http://pastie.caboo.se/20263 - Using edge rails (Rev: 5322) Hi, I''ve come across a problem I''m not quite sure how to solve. I have a setup similar to that shown in the pastie. I.e. I define a constant (which lies in a module) in a plugin of mine. Then in another plugin I add a method to the ApplicationHelper which uses that constant. If I set config.cache_classes to true for development, everything works fine. But set to false, I get undefined constant errors (after second request) for MY_CONST. My problem appears to be that MY_CONST is not reloaded after dependencies are cleared. I''ve tried replacing all ''require'' statements in both my plugins with require_dependency but that doesn''t seem to help. In fact, for some reason that doesn''t add my helper method to ApplicationHelper. Does anyone have any ideas about how I can get this to reload in development mode? I''d appreciate any help with this as I''ve spent the last two days trying to debug this to no avail. Many thanks, Saimon -- 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 -~----------~----~----~----~------~----~------~--~---
I''d really appreciate another brain looking into this as I''m completely stumped on this one. Thanks Saimon Saimon Moore wrote:> See this http://pastie.caboo.se/20263 > - Using edge rails (Rev: 5322) > > Hi, I''ve come across a problem I''m not quite sure how to solve. > > I have a setup similar to that shown in the pastie. I.e. I define a > constant (which lies in a module) in a plugin of mine. Then in another > plugin I add a method to the ApplicationHelper which uses that constant. > > If I set config.cache_classes to true for development, everything works > fine. But set to false, I get undefined constant errors (after second > request) for MY_CONST. > > My problem appears to be that MY_CONST is not reloaded after > dependencies are cleared. > > I''ve tried replacing all ''require'' statements in both my plugins with > require_dependency but that doesn''t seem to help. In fact, for some > reason that doesn''t add my helper method to ApplicationHelper. > > Does anyone have any ideas about how I can get this to reload in > development mode? > > I''d appreciate any help with this as I''ve spent the last two days trying > to debug this to no avail. > > Many thanks, > > Saimon-- 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 -~----------~----~----~----~------~----~------~--~---