Forum: Ruby on Rails Setup problem

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.
Mark B. (Guest)
on 2006-04-19 07:01
I am trying to set up rails and am have problems.  I have googled
everything I could think of, but have not found my problem.  Here are my

Gentoo Linux 2006.0
Apache 2.2
Ruby 1.8.4
Gems 1.8
Rails 1.1.2
mod_fcgid 1.08

When I try to access my test rails app through the webserver, I get the
following error in the error.log (after seeing a html 500 error on the

[Fri Apr 14 19:54:48 2006] [notice] mod_fcgid: server
/var/www/rails/cookbook/public/dispatch.fcgi(20039) started
`const_missing': uninitialized constant RailsFCGIHandler (NameError)
	from /var/www/rails/cookbook/public/dispatch.fcgi:25

I have seen suggestions to run 'ruby dispatch.fcgi' from the command
line, but I get the same error.

Any suggestions?
Joe C. (Guest)
on 2006-04-19 09:57
(Received via mailing list)
Have you installed the fastcgi dev kit and ruby bindings?

Joe C.
Mark B. (Guest)
on 2006-04-19 23:33
I installed everything the WiKi said.

rails gem
fcgi gem

Is there something else I need?
Mark B. (Guest)
on 2006-04-20 22:46
Any ideas anyone?

Anonymous (Guest)
on 2006-04-28 01:57
(Received via mailing list)
I had the exact same side effect when the fcgi gem wasn't installed...
so I'd be suspcicious about that gem... maybe it's not installed
Anonymous (Guest)
on 2006-05-10 11:26
(Received via mailing list)
home equity line of credit
Michael S. (Guest)
on 2007-08-23 18:26
Anonymous wrote:
> I had the exact same side effect when the fcgi gem wasn't installed...
> so I'd be suspcicious about that gem... maybe it's not installed
> correctly?

I have the exact same problem:
root public# ./dispatch.fcgi
./dispatch.fcgi:19: uninitialized constant RailsFCGIHandler (NameError)
root public#

And I do have fcgi installed:
root public# gem list

*** LOCAL GEMS ***

actionmailer (1.3.3)
    Service layer for easy email delivery and testing.

actionpack (1.13.3)
    Web-flow and rendering framework putting the VC in MVC.

actionwebservice (1.2.3)
    Web service support for Action Pack.

activerecord (1.15.3)
    Implements the ActiveRecord pattern for ORM.

activesupport (1.4.2)
    Support and utility classes used by the Rails framework.

cgi_multipart_eof_fix (2.3)
    Fix an exploitable bug in CGI multipart parsing.

fastthread (1.0)
    Optimized replacement for thread.rb primitives

fcgi (0.8.7)
    FastCGI library for Ruby.

fcgiwrap (0.1.5)
    A trick to wrap CGI in FastCGI easily

flvtool2 (1.0.6)
    Flash video (FLV) manipulation tool

gem_plugin (0.2.2)
    A plugin system based only on rubygems that uses dependencies only

highline (1.4.0)
    HighLine is a high-level command-line IO library.

needle (1.3.0)
    Needle is a Dependency Injection/Inversion of Control container for
    Ruby. It supports both type-2 (setter) and type-3 (constructor)
    injection. It takes advantage of the dynamic nature of Ruby to
    provide a rich and flexible approach to injecting dependencies.

rails (1.2.3)
    Web-application framework with template engine, control-flow layer,
    and ORM.

rake (0.7.3)
    Ruby based make-like utility.

rubyforge (0.4.4)
    A script which automates a limited set of rubyforge operations.

sources (0.0.1)
    This package provides download sources for remote gem installation
root public#

So this isn't a web service problem, it's a ruby not loading with it's
own fcgi gem.  I installed it by running
root public# gem install fcgi

Then I again tried installing manually, by downloading the tgz and
manually building it.  It built without errors, and still the same
result.  Has anyone got this to work?
Michael S. (Guest)
on 2007-08-23 18:32
Ok, I fixed it!

My dispatch.fcgi file originally read:

 RailsFCGIHandler.process! '/var/log/myapp_fcgi_crash.log'
 require File.dirname(__FILE__) + "/../config/environment"
 require 'fcgi_handler'


And something didn't seem right about that, so I tested a theory:

 require File.dirname(__FILE__) + "/../config/environment"
 require 'fcgi_handler'
 RailsFCGIHandler.process! '/var/log/myapp_fcgi_crash.log'


Guess what!  That fixed it, and I wasted an entire day on this.  I'm
submitting a bug right after posting this.

This topic is locked and can not be replied to.