Dmitry.Sokurenko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Feb-22 13:42 UTC
How to reload classes on each request?
Hi guys. I am playing with Rails, for two days, it''s great, but I have one very annoying problem. Now I''m restaring web server after each code change, because otherwise server use old classes. Rails doesn''t refresh models, controllers, helpers, but refreshes RHTMLs. I''m running in development environment, with standard config: config.cache_classes = false config.whiny_nils = true config.breakpoint_server = true config.action_controller.consider_all_requests_local = true config.action_controller.perform_caching = false config.action_view.cache_template_extensions = false config.action_view.debug_rjs = true config.action_mailer.raise_delivery_errors = false I tried webrick and mongrel, tried run it from radrails, nothing helped. I use ruby 1.8.5, rails 1.2.2, mongrel 1.0.1, on Windows Vista. I somebody knows what should I do, please help me. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Odd, because using WEbrick (ruby script/server) does that exactly. I guess try reinstalling Rails? Jason On 2/22/07, Dmitry.Sokurenko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <Dmitry.Sokurenko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > Hi guys. > > I am playing with Rails, for two days, it''s great, but I have one very > annoying problem. > > Now I''m restaring web server after each code change, because otherwise > server use old classes. > Rails doesn''t refresh models, controllers, helpers, but refreshes > RHTMLs. > > I''m running in development environment, with standard config: > config.cache_classes = false > config.whiny_nils = true > config.breakpoint_server = true > config.action_controller.consider_all_requests_local = true > config.action_controller.perform_caching = false > config.action_view.cache_template_extensions = false > config.action_view.debug_rjs = true > config.action_mailer.raise_delivery_errors = false > > I tried webrick and mongrel, tried run it from radrails, nothing > helped. > I use ruby 1.8.5, rails 1.2.2, mongrel 1.0.1, on Windows Vista. > > I somebody knows what should I do, please help me. > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Jason Roelofs wrote:> Odd, because using WEbrick (ruby script/server) does that exactly. I > guess > try reinstalling Rails? > > JasonMake sure your environment settings (in config/environment.rb if I remember correctly) is set to development and not production. On development everything is reloaded on each request which means it is slower but uses the very latest code. -- 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 -~----------~----~----~----~------~----~------~--~---
Dmitry.Sokurenko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Feb-22 16:28 UTC
Re: How to reload classes on each request?
I'' m absolutely sure that I''m running dev environment. Really now I install InstantRails and point InstantRails version of Mongrel, and my separately installed version of Mongrel to the same app dir, InstantRails version refreshes files, but my mongrel and webrick do not. I absolutely don''t understand where is the difference between them. Server versions are identical, env = dev - 100%. On 22 фев, 19:18, Guest <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Jason Roelofs wrote: > > Odd, because using WEbrick (ruby script/server) does that exactly. I > > guess > > try reinstalling Rails? > > > Jason > > Make sure your environment settings (in config/environment.rb if I > remember correctly) is set to development and not production. > > On development everything is reloaded on each request which means it is > slower but uses the very latest code. > > -- > 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 For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---