Hello,
I’ve been going though the “4 Days on Rails” tutorial at
http://rails.homelinux.org/ test-driving ruby on rails using the WEBrick
server without problems. I’m trying to move the app to be seen by
apache2, and am having some troubles. I’ve looked through many guides
online which all say pretty much the same thing, which, I think, I am
doing.
Anyway, the debug information is below that I believe is pertinent.
Any thoughts? Thanks.
-Chad
Ubuntu 6.06, Apache/2.0.55 (Ubuntu) PHP/5.1.2, ruby 1.8.4 (2005-12-24)
[i486-linux], Rails 1.1.2
The app is located at /home/crvoelker/src/ToDo/
—start segment---- /etc/apache2/apache2.conf
…
#AddHandler cgi-script .cgi
AddHandler fcgid-script .fcgi
…
Alias /ToDo/ “/home/crvoelker/src/ToDo/public/”
<Directory “/home/crvoelker/src/ToDo/public/”>
Options Indexes MultiViews ExecCGI FollowSymLinks
AddHandler cgi-script .cgi
AddHandler fcgid-script .fcgi .fcg .fpl
AllowOverride All
Allow from all
Order allow,deny
—end segment---- /etc/apache2/apache2.conf
—start segment---- /home/crvoelker/src/ToDo/public/.htaccess
RewriteEngine On
RewriteBase /ToDo
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
ErrorDocument 500 “
Application error
Rails application failed tostart properly”
—end segment---- /home/crvoelker/src/ToDo/public/.htaccess
$ a2enmod fcgid
This module is already enabled!
$ dpkg --get-selections | grep cgi
libapache2-mod-fcgid install
libfcgi-dev install
libfcgi-ruby1.8 install
libfcgi0 install
$ sudo gem install fcgi
Attempting local installation of ‘fcgi’
Local gem file not found: fcgi*.gem
Attempting remote installation of ‘fcgi’
Building native extensions. This could take a while…
extconf.rb:3:in `require’: no such file to load – mkmf (LoadError)
from extconf.rb:3
ERROR: While executing gem … (RuntimeError)
ERROR: Failed to build gem native extension.
Gem files will remain installed in
/usr/lib/ruby/gems/1.8/gems/fcgi-0.8.6.1 for inspection.
ruby extconf.rb install fcgi\n
Results logged to
/usr/lib/ruby/gems/1.8/gems/fcgi-0.8.6.1/ext/gem_make.out