Forum: Ruby on Rails RoR, Apache2, fcgid and ubuntu...

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Jeba M. (Guest)
on 2009-01-06 10:55
(Received via mailing list)
I'm trying to deploy my rails application on ubuntu server using
and fcgid..but have not been successful..
I am using ruby 1.8.6, rails 2.2.2 and fcgi 0.8.7 gem...
I am able to start apache successfully and view the Aptana RadRails
welcome page..But giving my controller's name gives me a 404 error...
I have made required changes in my /public/.htaccess and

.htaccess(w/o comments)

AddHandler fastcgi-script .fcgi
AddHandler fcgid-script .fcgi
AddHandler cgi-script .cgi
Options +FollowSymLinks +ExecCGI
RewriteEngine On
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

ErrorDocument 500 "<h2>Application error</h2>Rails application failed
start properly"


require File.dirname(__FILE__) + "/../config/environment"
require 'fcgi_handler'
require 'rubygems'
require_gem 'fcgi'

Also..I have added the follwing lines to my /usr/local/apache2/conf/
httpd.conf file...

<Directory /home/jeba/CRSA/>
AllowOverride all
Order allow,deny
Deny from all
Allow from localhost

LoadModule fcgid_module /usr/local/apache2/modules/

AddHandler fcgid-script .fcgi IPCCommTimeout 40 IPCConnectTimeout 10
DefaultInitEnv RAILS_ENV production SocketPath /tmp/fcgidsock

<VirtualHost *:80>
DocumentRoot /home/jeba/CRSA/public
ServerName localhost
ErrorLog /var/log/apache2-error_log
CustomLog /var/log/apache2-access_log common
Options Indexes ExecCGI FollowSymLinks
RewriteEngine On

I have checked that my VirtualHost works perfectly...but it doesn't
to start my rails application....

Can someone please tell me where am I going wrong????
Thanks in advance..
This topic is locked and can not be replied to.