Forum: Ruby on Rails Model Modules, Dev vs Prod

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
John S. (Guest)
on 2006-05-22 21:50
(Received via mailing list)
I have a pretty complex model with many modules and I have been
trying to keep it clean, but I find that loading the model in
development mode using WebBrick is much more lenient than production
mode with lighttpd/fcgi. For instance,  if I neglect to create a
dedicated file that declares the module then I run everything in
development mode it works fine, but as soon as it is deployed I get
'uninitialized constant' exceptions for the model. Does anyone know
how to get the development mode to more closely reflect the
production mode?

-John

--
John S.
Computing Staff - Webmaster
Kavli Institute for Theoretical Physics
University of California, Santa Barbara
removed_email_address@domain.invalid
(805) 893-6307
Alex W. (Guest)
on 2006-05-23 03:00
John S. wrote:
> I have a pretty complex model with many modules and I have been
> trying to keep it clean, but I find that loading the model in
> development mode using WebBrick is much more lenient than production
> mode with lighttpd/fcgi. For instance,  if I neglect to create a
> dedicated file that declares the module then I run everything in
> development mode it works fine, but as soon as it is deployed I get
> 'uninitialized constant' exceptions for the model. Does anyone know
> how to get the development mode to more closely reflect the
> production mode?
>
> -John
>
> --
> John S.
> Computing Staff - Webmaster
> Kavli Institute for Theoretical Physics
> University of California, Santa Barbara
> removed_email_address@domain.invalid
> (805) 893-6307

Sounds like your files are not being properly loaded due to production
caching.  Always be sure to restart the webserver after every deploy to
production.
This topic is locked and can not be replied to.