After I have uploaded my app where do I specify that my app should now use production environment settings and not development? Can that be done dynamically so that I don''t have to reset a value once I upload website? Thanks for your help!
Yea thats the idea: http://wiki.rubyonrails.com/rails/show/FastCGI Switching to Production environment Rails default environment is development. If you are deploying your application on a live server, make sure to set the right flags! Simply add one of the following to your Apache server configuration file(s). # serverwide FastCgiConfig -initial-env RAILS_ENV=production -restart or just for a specific application: # just for one application FastCgiServer /var/www/applications/myapp/public/dispatch.fcgi -initial-env RAILS_ENV=production On Wed, 16 Mar 2005 21:12:12 -0500, John Baku <john-CC0oh5EnFfVBDgjK7y7TUQ@public.gmane.org> wrote:> After I have uploaded my app where do I specify that my app should now > use production environment settings and not development? > > Can that be done dynamically so that I don''t have to reset a value once > I upload website? > > Thanks for your help! > > _______________________________________________ > 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
Do you know if by default on Textdrive the site is running on FastCGI and if not I am assuming the below will not work unless I make the site work on Fast CGI right? On 16-Mar-05, at 10:18 PM, Tobias Luetke wrote:> Yea thats the idea: > > http://wiki.rubyonrails.com/rails/show/FastCGI > > Switching to Production environment > > Rails default environment is development. If you are deploying your > application on a live server, make sure to set the right flags! Simply > add one of the following to your Apache server configuration file(s). > > # serverwide > FastCgiConfig -initial-env RAILS_ENV=production -restart > > or just for a specific application: > > # just for one application > FastCgiServer /var/www/applications/myapp/public/dispatch.fcgi > -initial-env RAILS_ENV=production > > > On Wed, 16 Mar 2005 21:12:12 -0500, John Baku <john-CC0oh5EnFfVBDgjK7y7TUQ@public.gmane.org> wrote: >> After I have uploaded my app where do I specify that my app should now >> use production environment settings and not development? >> >> Can that be done dynamically so that I don''t have to reset a value >> once >> I upload website? >> >> Thanks for your help! >> >> _______________________________________________ >> 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 > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
John, Whether or not you''re using FastCGI or not is not depending on TextDrive. It depends on your appname/public/.htaccess (or whichever ..htaccess you''re using). If you have a line saying: RewriteBase /dispatch.cgi You''re using plain cgi. If that''s dispatch.fcgi, you''re on FastCGI. Just changing that line will do the trick for you. BTW, you can also set the RAILS_ENV application-wise in config/environment.rb. You should have something like this in there: RAILS_ENV = ENV[''RAILS_ENV''] || ''development'' You can change that line to reflect your needs if you can''t (or don''t want to) mess with the apache configuration files. //jarkko On 17.3.2005, at 05:38, John Baku wrote:> Do you know if by default on Textdrive the site is running on FastCGI > and if not I am assuming the below will not work unless I make the > site work on Fast CGI right? > > On 16-Mar-05, at 10:18 PM, Tobias Luetke wrote: > >> Yea thats the idea: >> >> http://wiki.rubyonrails.com/rails/show/FastCGI >> >> Switching to Production environment >> >> Rails default environment is development. If you are deploying your >> application on a live server, make sure to set the right flags! Simply >> add one of the following to your Apache server configuration file(s). >> >> # serverwide >> FastCgiConfig -initial-env RAILS_ENV=production -restart >> >> or just for a specific application: >> >> # just for one application >> FastCgiServer /var/www/applications/myapp/public/dispatch.fcgi >> -initial-env RAILS_ENV=production >> >> >> On Wed, 16 Mar 2005 21:12:12 -0500, John Baku <john-CC0oh5EnFfVBDgjK7y7TUQ@public.gmane.org> >> wrote: >>> After I have uploaded my app where do I specify that my app should >>> now >>> use production environment settings and not development? >>> >>> Can that be done dynamically so that I don''t have to reset a value >>> once >>> I upload website? >>> >>> Thanks for your help! >>> >>> _______________________________________________ >>> 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 >> _______________________________________________ >> 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 >-- Jarkko Laine http://jlaine.net http://odesign.fi _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
I checked my .htaccess file and I have the following line: RewriteRule ^(.*)$ /dispatch.cgi?$1 [QSA,L] I changed the cgi to an .fcgi I get an Apached Error So I put the line back and added So I added a: RewriteBase /dispatch.fcgi after it and it worked fine. Not sure if it used cgi or fcgi (how would I check) I added: FastCgiConfig -initial-env RAILS_ENV=production -restart And I got an apache error again so I am assuming fast-cgi is not on. Anyone have any clue what I am doing wrong? On 17-Mar-05, at 4:58 AM, Jarkko Laine wrote:> John, > > Whether or not you''re using FastCGI or not is not depending on > TextDrive. It depends on your appname/public/.htaccess (or whichever > ..htaccess you''re using). > > If you have a line saying: > RewriteBase /dispatch.cgi > > You''re using plain cgi. If that''s dispatch.fcgi, you''re on FastCGI. > Just changing that line will do the trick for you. > > BTW, you can also set the RAILS_ENV application-wise in > config/environment.rb. You should have something like this in there: > RAILS_ENV = ENV[''RAILS_ENV''] || ''development'' > > You can change that line to reflect your needs if you can''t (or don''t > want to) mess with the apache configuration files. > > //jarkko > > On 17.3.2005, at 05:38, John Baku wrote: > >> Do you know if by default on Textdrive the site is running on FastCGI >> and if not I am assuming the below will not work unless I make the >> site work on Fast CGI right? >> >> On 16-Mar-05, at 10:18 PM, Tobias Luetke wrote: >> >>> Yea thats the idea: >>> >>> http://wiki.rubyonrails.com/rails/show/FastCGI >>> >>> Switching to Production environment >>> >>> Rails default environment is development. If you are deploying your >>> application on a live server, make sure to set the right flags! >>> Simply >>> add one of the following to your Apache server configuration file(s). >>> >>> # serverwide >>> FastCgiConfig -initial-env RAILS_ENV=production -restart >>> >>> or just for a specific application: >>> >>> # just for one application >>> FastCgiServer /var/www/applications/myapp/public/dispatch.fcgi >>> -initial-env RAILS_ENV=production >>> >>> >>> On Wed, 16 Mar 2005 21:12:12 -0500, John Baku <john-CC0oh5EnFfVBDgjK7y7TUQ@public.gmane.org> >>> wrote: >>>> After I have uploaded my app where do I specify that my app should >>>> now >>>> use production environment settings and not development? >>>> >>>> Can that be done dynamically so that I don''t have to reset a value >>>> once >>>> I upload website? >>>> >>>> Thanks for your help! >>>> >>>> _______________________________________________ >>>> 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 >>> _______________________________________________ >>> 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 >> > -- > Jarkko Laine > http://jlaine.net > http://odesign.fi > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails