Trouble with fastcgi and "undefined method `is_cgi?'"

I’m trying to get started with fastcgi on apache 2.0.54 on Fedora Core
I’ve created a really simple Rails app that doesn’t do any database
It works fine when I call it as CGI, but when I try to switch to
fastCGI, I
have problems.

I get the following error in log/fastcgi.crash.log:
[20/Dec/2005:10:16:53 :: 26912] Dispatcher failed to catch: undefined
is_cgi?' for FCGI:Class (NoMethodError) /usr/lib/ruby/gems/1.8/gems/fcgi-’
process!' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:22:inprocess!’
killed by this error

There’s a bunch of error messages in /var/log/httpd/error.log, but as
far as I
can tell, all they really say is that dispatch.fcgi died prematurely.

Here’s (what I think is) the relevant snippet from the httpd.conf:
LoadModule fastcgi_module modules/

FastCgiIpcDir /tmp/fcgi_ipc/
AddHandler fastcgi-script .fcgi

<Directory “/var/www/html/test2”>
AllowOverride All

Here’s the rewrite stuff from public/.htaccess :
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.cgi [QSA,L]

I’m running:
rails 1.0.0
fcgi (
mod_fcgi 2.4.2
fastcgi devel libraries 2.4.0
apache 2.0.54
Fedora Core 4

Any ideas?

This problem went away when I uninstalled the fcgi gem and used a
manually-installed fcgi instead.

This brings to mind a related question:
In the wiki at
it says
in public/dispatch.fcgi change

require 'fcgi'


require 'rubygems'
require_gem 'fcgi'

as part of the fastcgi installation instructions. Since there wasn’t a
“require ‘fcgi’” line in my public/dispatch.fcgi , I ignored this
There was, however, a “require ‘fcgi_handler’” Should I have replaced
line, and if so, with what?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs