Forum: Ruby on Rails Rails Development Environment and Reloading Models

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.
Steven H. (Guest)
on 2007-06-14 22:02
(Received via mailing list)

By default, rails reloads all your models, while in development mode,
each new request.  Is there anyway to specify that a given model, or
should not be reloaded?  This is specific to rails 1.2.3

MichaelLatta (Guest)
on 2007-06-14 22:13
(Received via mailing list)
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

Steven H. (Guest)
on 2007-06-14 23:02
(Received via mailing list)
Thanks for responding Michael (^_^)

The reason I need specific classes to be reloaded has to do with a
I'm working on. The plugin defines classes on the fly based on info from
few db tables--I know this is probably not the best of solutions...
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
classes after a reload.

I did find a work around however.  If you stick stuff in the lib
of your app, then it gets loaded only once, regardless of the

This topic is locked and can not be replied to.