I thought that Rails was supposed to allow development of an application *without* having to restart the webserver? I know this works in WEBRick ... but this doesn''t seem to be the case in Apache (linux). Am I missing something here, or does this only work in webrick? I suppose one should argue that for development you should just use webrick, but this wasn''t an option for me last night. I was working on a Rails app that was behind a firewall that only had port 80 open... It took me a while to realize that my "changes" weren''t taking effect because I hadn''t restarted apache. In what environment does development without webserver restarts possible?
Plain CGI works fine. You must be using fastcgi or mod_ruby. Belorion wrote:>I thought that Rails was supposed to allow development of an >application *without* having to restart the webserver? I know this >works in WEBRick ... but this doesn''t seem to be the case in Apache >(linux). Am I missing something here, or does this only work in >webrick? > >I suppose one should argue that for development you should just use >webrick, but this wasn''t an option for me last night. I was working >on a Rails app that was behind a firewall that only had port 80 >open... It took me a while to realize that my "changes" weren''t taking >effect because I hadn''t restarted apache. > >In what environment does development without webserver restarts possible? >_______________________________________________ >Rails mailing list >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails > >
Since you didn''t specify... what method for running your Rails application on Apache are you using? mod_ruby, FastCGI or standard CGI? Standard CGI most certainly doesn''t require server restart, since everything is reread per-request. FastCGI shouldn''t require restart of Apache either, although, I have occassionally seen odd behavior that is generally solved when I kill the FastCGI process. Running under mod_ruby will require restart. This happens to be a limitation of mod_ruby, that is documented here: http://www.modruby.net/en/doc/?FAQ#Why+are+changes+to+my+library+not+reflected+in+the+server%3F. (And I''m aware that using "load" instead of "require" is supposed to fix this, but I''m unconvinced that it''s 100% fool proof.) Probably the easiest thing to do is if you''re going to develop with Apache, just use standard CGI -- it''s slow, but it works. Cheers, Ben On Wed, 2 Mar 2005 15:21:45 -0600, Belorion <belorion-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I thought that Rails was supposed to allow development of an > application *without* having to restart the webserver? I know this > works in WEBRick ... but this doesn''t seem to be the case in Apache > (linux). Am I missing something here, or does this only work in > webrick? > > I suppose one should argue that for development you should just use > webrick, but this wasn''t an option for me last night. I was working > on a Rails app that was behind a firewall that only had port 80 > open... It took me a while to realize that my "changes" weren''t taking > effect because I hadn''t restarted apache. > > In what environment does development without webserver restarts possible? > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
It works fine with any web server as long as you stick to the development environment. production gets rid of reloading. On Wed, 2 Mar 2005 22:29:32 +0100, Ben Schumacher <benschumacher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Since you didn''t specify... what method for running your Rails > application on Apache are you using? mod_ruby, FastCGI or standard > CGI? > > Standard CGI most certainly doesn''t require server restart, since > everything is reread per-request. FastCGI shouldn''t require restart of > Apache either, although, I have occassionally seen odd behavior that > is generally solved when I kill the FastCGI process. Running under > mod_ruby will require restart. This happens to be a limitation of > mod_ruby, that is documented here: > http://www.modruby.net/en/doc/?FAQ#Why+are+changes+to+my+library+not+reflected+in+the+server%3F. > (And I''m aware that using "load" instead of "require" is supposed to > fix this, but I''m unconvinced that it''s 100% fool proof.) > > Probably the easiest thing to do is if you''re going to develop with > Apache, just use standard CGI -- it''s slow, but it works. > > Cheers, > > Ben > > > On Wed, 2 Mar 2005 15:21:45 -0600, Belorion <belorion-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I thought that Rails was supposed to allow development of an > > application *without* having to restart the webserver? I know this > > works in WEBRick ... but this doesn''t seem to be the case in Apache > > (linux). Am I missing something here, or does this only work in > > webrick? > > > > I suppose one should argue that for development you should just use > > webrick, but this wasn''t an option for me last night. I was working > > on a Rails app that was behind a firewall that only had port 80 > > open... It took me a while to realize that my "changes" weren''t taking > > effect because I hadn''t restarted apache. > > > > In what environment does development without webserver restarts possible? > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Tobi http://www.snowdevil.ca - Snowboards that don''t suck http://www.hieraki.org - Open source book authoring http://blog.leetsoft.com - Technical weblog