Hi, I changed my environmnet.rb to say PRODUCTION mode, however when I start up a server "ruby scripts/server" a) it runs in development mode (via the logs) - any ideas why? b) why does webbrick run - I thought by default now it was supposed to be lightty Tks -- Posted via http://www.ruby-forum.com/.
Greg Hauptmann
2006-Jul-29 16:33 UTC
[Rails] Re: why is webrick running in development mode?
Oh.. I guess I''m trying to understand why on my hosting environment (dreamhost) it seems to run in PRODUCTION mode (dreamhost using Apache & FastCGI), but on my local PC (with the same environment.rb file) it runs in DEVELOPMENT mode. Perhaps the script/server scripts themself override the environment.rb setting? BTW - The behaviour I''m after is pretty much as things are occuring now, I just don''t quite understand why things are occuring like they are :) Greg jh100000 wrote:> Greg Hauptmann wrote: >> Hi, >> >> I changed my environmnet.rb to say PRODUCTION mode, however when I start >> up a server "ruby scripts/server" >> >> a) it runs in development mode (via the logs) - any ideas why? >> >> b) why does webbrick run - I thought by default now it was supposed to >> be lightty >> >> Tks > > To get webby to run in production mode I think you need to do > > script/server -e production or > > script/server --environment=production > > > --John-- Posted via http://www.ruby-forum.com/.
Greg, If you''ve got Agile Web Dev with Rails, goto pg 463 where it explains how to set the environment for each webserver. Using -e production only works for webrick. Apache uses the RAILS_ENV. hth, --John -- Posted via http://www.ruby-forum.com/.
Greg Hauptmann wrote:> Hi, > > I changed my environmnet.rb to say PRODUCTION mode, however when I start > up a server "ruby scripts/server" > > a) it runs in development mode (via the logs) - any ideas why? > > b) why does webbrick run - I thought by default now it was supposed to > be lightty > > TksTo get webby to run in production mode I think you need to do script/server -e production or script/server --environment=production --John -- Posted via http://www.ruby-forum.com/.
Derek Chesterfield
2006-Jul-30 16:37 UTC
[Rails] why is webrick running in development mode?
a) Do you mean you uncommented the following line? # ENV[''RAILS_ENV''] ||= ''production'' b) Is lighttpd in your PATH? Try ''which lighttpd'' to check. On 29 Jul 2006, at 13:34, Greg Hauptmann wrote:> I changed my environmnet.rb to say PRODUCTION mode, however when I > start > up a server "ruby scripts/server" > > a) it runs in development mode (via the logs) - any ideas why? > b) why does webbrick run - I thought by default now it was supposed to > be lightty
Steve Bergman
2006-Jul-30 22:32 UTC
[Rails] Re: why is webrick running in development mode?
Rails will not use lighttpd if the libfcgi-ruby is not installed. That''s tripped me up a couple of times. -- Posted via http://www.ruby-forum.com/.
Greg Hauptmann
2006-Jul-31 09:37 UTC
[Rails] Re: why is webrick running in development mode?
I used InstantRails to get Ruby/Rails onto my PC so perhaps lighttpd is not part of the package, so I guess this is why its defaulting to webbrick. Is it worth installing any making the move from webbrick to lighty just for a development environment on my PC? (i.e. I''m using dreamhost for hosting, so this is Apache/FastCGI I believe - I guess the best would be to match production and run Apache/FastCGI on my PC???) Tks Steve Bergman wrote:> > > Rails will not use lighttpd if the libfcgi-ruby is not installed. > That''s tripped me up a couple of times.Derek Chesterfield wrote:> a) Do you mean you uncommented the following line? > # ENV[''RAILS_ENV''] ||= ''production'' > b) Is lighttpd in your PATH? Try ''which lighttpd'' to check.-- Posted via http://www.ruby-forum.com/.
Apparently Analagous Threads
- Troubleshooting tips for getting Apache/RailsApp/Dreamhost
- Dreamhost working deploy.rb? Can anyone post/send me a copy?
- help with "rake db:migrate" error please?
- Cheapest Rails Hosting where they give you full access to Apache (to load modules etc)???
- Capistrano - freezes & I don''t get prompted for password??