Hi, So in the past I''ve developed using Apache 2.0 MacOSX. I''ve just started a new project and decided to switch over to LightTPD just to try it out. This development is purely a learning endevor for me, so I welcome the idea of stepping into new territory. As a result, I''m not sure if this is a lighttpd problem or a Rails one. So pardon me if this is off topic to this mailing list. On apache, everytime I made a new request, my environments.rb file would be reloaded. So once I made a change to that file, all I''d have to do is make a new request. Now, since I''ve changed to lighttpd (or simply started this new project), I''ve noticed that it seems to only get loaded at startup. I have to restart the server in order for any of my changes to be reflected. Speaking of which. The only way I know how to restart the server if by killing the process directly. Is there any easier way? Thanks, Ryan -- View this message in context: http://www.nabble.com/Configs-not-loading-t1720938.html#a4674524 Sent from the RubyOnRails Users forum at Nabble.com.
Assuming you''re using FCGI, do you have a line in your lighty config that looks like this? "bin-environment" => ("RAILS_ENV" => "development") -- -- Tom Mornini On Jun 1, 2006, at 10:33 PM, Wuher wrote:> So in the past I''ve developed using Apache 2.0 MacOSX. I''ve just > started a > new project and decided to switch over to LightTPD just to try it > out. This > development is purely a learning endevor for me, so I welcome the > idea of > stepping into new territory. As a result, I''m not sure if this is a > lighttpd problem or a Rails one. So pardon me if this is off topic > to this > mailing list. > > On apache, everytime I made a new request, my environments.rb file > would be > reloaded. So once I made a change to that file, all I''d have to do > is make > a new request. Now, since I''ve changed to lighttpd (or simply > started this > new project), I''ve noticed that it seems to only get loaded at > startup. I > have to restart the server in order for any of my changes to be > reflected. > > Speaking of which. The only way I know how to restart the server > if by > killing the process directly. Is there any easier way? > > Thanks, > Ryan > -- > View this message in context: http://www.nabble.com/Configs-not- > loading-t1720938.html#a4674524 > Sent from the RubyOnRails Users forum at Nabble.com. > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Yes. That''s how I noticed the problem actually. I uncommented the line: # ENV[''RAILS_ENV''] ||= ''production'' In my environments.rb file, but it remained in development mode until I restarted the server. I''m also using a localization plugin, and the line: Localization::load_localized_strings which does that obvious, only runs at startup as well. So if I make a change to my localized strings file, it isn''t reflected until I restart the server. It''s definitely not ideal. Thanks, Ryan Tom Mornini wrote:> > Assuming you''re using FCGI, do you have a line in your lighty config > that > looks like this? > > "bin-environment" => ("RAILS_ENV" => "development") > > -- > -- Tom Mornini > > On Jun 1, 2006, at 10:33 PM, Wuher wrote: > >> So in the past I''ve developed using Apache 2.0 MacOSX. I''ve just >> started a >> new project and decided to switch over to LightTPD just to try it >> out. This >> development is purely a learning endevor for me, so I welcome the >> idea of >> stepping into new territory. As a result, I''m not sure if this is a >> lighttpd problem or a Rails one. So pardon me if this is off topic >> to this >> mailing list. >> >> On apache, everytime I made a new request, my environments.rb file >> would be >> reloaded. So once I made a change to that file, all I''d have to do >> is make >> a new request. Now, since I''ve changed to lighttpd (or simply >> started this >> new project), I''ve noticed that it seems to only get loaded at >> startup. I >> have to restart the server in order for any of my changes to be >> reflected. >> >> Speaking of which. The only way I know how to restart the server >> if by >> killing the process directly. Is there any easier way? >> >> Thanks, >> Ryan >> -- >> View this message in context: http://www.nabble.com/Configs-not- >> loading-t1720938.html#a4674524 >> Sent from the RubyOnRails Users forum at Nabble.com. >> >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > >-- View this message in context: http://www.nabble.com/Configs-not-loading-t1720938.html#a4683231 Sent from the RubyOnRails Users forum at Nabble.com.
Wuher wrote:> Yes. That''s how I noticed the problem actually. I uncommented the > line: > > # ENV[''RAILS_ENV''] ||= ''production'' > > In my environments.rb file, but it remained in development mode until I > restarted the server. I''m also using a localization plugin, and the > line: > > Localization::load_localized_strings > > which does that obvious, only runs at startup as well. So if I make a > change to my localized strings file, it isn''t reflected until I restart > the > server. It''s definitely not ideal. > > Thanks, > Ryan > > > Tom Mornini wrote: >> On Jun 1, 2006, at 10:33 PM, Wuher wrote: >>> mailing list. >>> reflected. >>> Sent from the RubyOnRails Users forum at Nabble.com. >> >> > -- > View this message in context: > http://www.nabble.com/Configs-not-loading-t1720938.html#a4683231 > Sent from the RubyOnRails Users forum at Nabble.com.That''s just how it works. Switching your environment only works when the app is loaded. With lighttpd/fcgi the app then stays in memory ready to process requests. There are even some things that don''t get reloaded in development mode. One thing you can do is if you have class you want reloaded in development mode simply class Foo include Reloadable end It was probably reloading everything in apache because you wwere probably using cgi, which loads, processes, and quits the app for every single request, meaning all files are reloaded every request no matter what. With fcgi the app is only loaded once. -- Posted via http://www.ruby-forum.com/.