Forum: Ruby on Rails How to reload classes on each request?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
782b01570270ab10543bc25a258d7ea8?d=identicon&s=25 (Guest)
on 2007-02-22 14:43
(Received via mailing list)
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

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
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.
83ca41657a99b65d99889abe712ba5e2?d=identicon&s=25 Jason Roelofs (Guest)
on 2007-02-22 14:52
(Received via mailing list)
Odd, because using WEbrick (ruby script/server) does that exactly. I
try reinstalling Rails?

Abb249055208c7af4d35568e422dfd63?d=identicon&s=25 Guest (Guest)
on 2007-02-22 17:18
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.
782b01570270ab10543bc25a258d7ea8?d=identicon&s=25 (Guest)
on 2007-02-22 17:29
(Received via mailing list)
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%.
This topic is locked and can not be replied to.