[Rails] Re: any luck installing RoR with apache / cpanel setup?

Helium Exchange
Mon, 27 Mar 2006 19:58:39 -0000

it can get more tricky when you incorporate fastcgi into the mix. below
are some notes on that. if you start running your app in
''production'',
which''ll give you a huge speed boost, you may have to force apache to
reload when you make changes to your app. the way to do this is
add/delete a dummy subdomain so that apache is forced to reload itself.
try not to do this too often though as it could impact performance for
others on the same server.

FastCGI is very tricky to debug and most of the time an error is for a
random reason. Here are few tips for working with FastCGI.

1. Always make sure your running in production mode by setting this in
environment.rb

2. When you switch from cgi to fastcgi, completely exit your browser
application before trying to access the site again, the reason being
that the cgi and fastcgi processes cannot share session information.

3. To switch to fastcgi mode, edit the .htaccess file in railsapp/public
and change dispatch.cgi to dispatch.fcgi

4. Your permission settings are a little different for FastCGI mode vs.
CGI
mode. Your /railsapp/log directory needs to be 777 so the fastcgi
process can write to the fastcgi crash log.

5. Your process will not stay running because network redux use dynamic
fastcgi processes. If your site is not being used then apache will try
and kill your processes to conserve resources in our shared environment.

6. Make sure there are no errors or warnings, this can cause problems.

Josh Kieschnick wrote:
> i haven''t tried your 2nd method yet, but i will be needing that
one soon
> to. the first one worked! YAY!
>
> are there any drawbacks to doing it this way? the tutorial on the rails
> wiki made it seem so much more complicated.