# Setup problem

**URL:** <https://www.ruby-forum.com/t/setup-problem/94050>\
**Category:** Rails\
**Created:** [April 19, 2006, 5:01am UTC](https://www.ruby-forum.com/t/setup-problem/94050 "2006-04-19T05:01:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![markbates](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/d26b3c/32.png) [@markbates](https://www.ruby-forum.com/u/markbates)\
**Post date:** [April 19, 2006, 5:01am UTC](https://www.ruby-forum.com/t/setup-problem/94050/1 "2006-04-19T05:01:23Z")

</div>

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  
specs.

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  
page).

[Fri Apr 14 19:54:48 2006] [notice] mod\_fcgid: server  
/var/www/rails/cookbook/public/dispatch.fcgi(20039) started  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/dependencies.rb:123:in  
`const_missing': uninitialized constant RailsFCGIHandler (NameError) from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in`const\_missing’  
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?

---

<div class="post-metadata">

**Author:** ![markbates](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/d26b3c/32.png) [@markbates](https://www.ruby-forum.com/u/markbates)\
**Post date:** [April 19, 2006, 7:57am UTC](https://www.ruby-forum.com/t/setup-problem/94050/2 "2006-04-19T07:57:12Z")

</div>

Have you installed the fastcgi dev kit and ruby bindings?

–  
Joe C.

> **[RailsPlayground.com Ruby On Rails Hosting](https://railsplayground.com/)**
>
> Ruby on Rails Web Hosting starting at just $5/a month

---

<div class="post-metadata">

**Author:** ![markbates](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/d26b3c/32.png) [@markbates](https://www.ruby-forum.com/u/markbates)\
**Post date:** [April 19, 2006, 9:33pm UTC](https://www.ruby-forum.com/t/setup-problem/94050/3 "2006-04-19T21:33:54Z")

</div>

I installed everything the WiKi said.

Apache  
mod\_fcgid  
fcgi  
gems  
ruby  
rails gem  
fcgi gem

Is there something else I need?

---

<div class="post-metadata">

**Author:** ![markbates](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/d26b3c/32.png) [@markbates](https://www.ruby-forum.com/u/markbates)\
**Post date:** [April 20, 2006, 8:46pm UTC](https://www.ruby-forum.com/t/setup-problem/94050/4 "2006-04-20T20:46:02Z")

</div>

Any ideas anyone?

Thanks.

---

<div class="post-metadata">

**Author:** ![markbates](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/d26b3c/32.png) [@markbates](https://www.ruby-forum.com/u/markbates)\
**Post date:** [May 10, 2006, 9:26am UTC](https://www.ruby-forum.com/t/setup-problem/94050/5 "2006-05-10T09:26:57Z")

</div>

home equity line of credit

---

<div class="post-metadata">

**Author:** ![markbates](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/d26b3c/32.png) [@markbates](https://www.ruby-forum.com/u/markbates)\
**Post date:** [April 27, 2006, 11:57pm UTC](https://www.ruby-forum.com/t/setup-problem/94050/6 "2006-04-27T23:57:23Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![markbates](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/d26b3c/32.png) [@markbates](https://www.ruby-forum.com/u/markbates)\
**Post date:** [August 23, 2007, 4:32pm UTC](https://www.ruby-forum.com/t/setup-problem/94050/7 "2007-08-23T16:32:50Z")

</div>

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’

RailsFCGIHandler.process!

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’

RailsFCGIHandler.process!

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

Cheers,  
Michael

---

<div class="post-metadata">

**Author:** ![markbates](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/d26b3c/32.png) [@markbates](https://www.ruby-forum.com/u/markbates)\
**Post date:** [August 23, 2007, 4:26pm UTC](https://www.ruby-forum.com/t/setup-problem/94050/8 "2007-08-23T16:26:08Z")

</div>

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?
