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.
858392acd1398aa6071fb1d44cc33842?d=identicon&s=25 John Smilanick (Guest)
on 2006-05-22 19: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 Smilanick
Computing Staff - Webmaster
Kavli Institute for Theoretical Physics
University of California, Santa Barbara
jsmilani@kitp.ucsb.edu
(805) 893-6307
D0cd6b10e01bacb976b3b815a9c660bc?d=identicon&s=25 Alex Wayne (Guest)
on 2006-05-23 01:00
John Smilanick 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 Smilanick
> Computing Staff - Webmaster
> Kavli Institute for Theoretical Physics
> University of California, Santa Barbara
> jsmilani@kitp.ucsb.edu
> (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.