Hi, By default, rails reloads all your models, while in development mode, with each new request. Is there anyway to specify that a given model, or models, should not be reloaded? This is specific to rails 1.2.3 Thanks, Steven --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
As far as I know there is only a way to disable reloading in general. Why would you need it to be selective? Are you patching the class in a way that is being undone? I am patching several classes and this has not appeared to be an issue to date. The only issue has been when I modify the patches themselves and I need to restart the server to get environment.rb to be processed again (where some of my patches are loaded). Michael On Jun 14, 11:01 am, "Steven Hansen" <codetur...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > By default, rails reloads all your models, while in development mode, with > each new request. Is there anyway to specify that a given model, or models, > should not be reloaded? This is specific to rails 1.2.3 > > Thanks, > Steven--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Steven Hansen
2007-Jun-14 19:01 UTC
Re: Rails Development Environment and Reloading Models
Thanks for responding Michael (^_^) The reason I need specific classes to be reloaded has to do with a plugin I''m working on. The plugin defines classes on the fly based on info from a few db tables--I know this is probably not the best of solutions... Anyway, I''m running into problems when rails reloads these particular models. Everything works find in production mode, but in dev mode I keep getting const_missing errors as rails can''t find the definitions for my "dynamic" classes after a reload. I did find a work around however. If you stick stuff in the lib directory of your app, then it gets loaded only once, regardless of the environment. Regards, Steven --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---