# RailsFCGIHandler(NameError)

**URL:** <https://www.ruby-forum.com/t/railsfcgihandler-nameerror/75484>\
**Category:** Rails\
**Created:** [March 1, 2006, 10:52pm UTC](https://www.ruby-forum.com/t/railsfcgihandler-nameerror/75484 "2006-03-01T22:52:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohammad\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/8e8cbc/32.png) [@Mohammad\_K](https://www.ruby-forum.com/u/Mohammad_K)\
**Post date:** [March 1, 2006, 10:52pm UTC](https://www.ruby-forum.com/t/railsfcgihandler-nameerror/75484/1 "2006-03-01T22:52:55Z")

</div>

/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active\_support/dependencies.rb:200:in  
`const\_missing’: uninitialized constant RailsFCGIHandler (NameError)  
from /var/rails/depot/public/dispatch.fcgi:24

I get the above log from my webserver running on apache+FastCGI

Any help would be greatly appreciated,

Mohammad

---

<div class="post-metadata">

**Author:** ![Mohammad\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/8e8cbc/32.png) [@Mohammad\_K](https://www.ruby-forum.com/u/Mohammad_K)\
**Post date:** [March 1, 2006, 10:57pm UTC](https://www.ruby-forum.com/t/railsfcgihandler-nameerror/75484/2 "2006-03-01T22:57:14Z")

</div>

On 3/1/06, Mohammad K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active\_support/dependencies.rb:200:in  
> `const\_missing’: uninitialized constant RailsFCGIHandler (NameError)  
> from /var/rails/depot/public/dispatch.fcgi:24
> 
> I get the above log from my webserver running on apache+FastCGI

Try running dispatch.fcgi directly from the command line.

It should generate something like “Error 500: Internal Server Error”

If instead it blows up with a ruby dump you don’t have the ruby fcgi  
gem installed correctly.

## Greg

Greg F.  
The Norcross Group  
Forensics for the 21st Century

---

<div class="post-metadata">

**Author:** ![Mohammad\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/8e8cbc/32.png) [@Mohammad\_K](https://www.ruby-forum.com/u/Mohammad_K)\
**Post date:** [March 2, 2006, 3:43am UTC](https://www.ruby-forum.com/t/railsfcgihandler-nameerror/75484/3 "2006-03-02T03:43:38Z")

</div>

I forgot to install fcgi and fcgi.gem… after install them,

I don’t see any output for ‘ruby dispatch.fcgi’  
But still have the following in my log:

[Wed Mar 01 21:34:51 2006] [warn] FastCGI: server  
“/var/rails/depot/public/dispatch.fcgi” (pid 6975) terminated by  
calling exit with status ‘0’  
[Wed Mar 01 21:34:51 2006] [warn] FastCGI: server  
“/var/rails/depot/public/dispatch.fcgi” has failed to remain running  
for 30 seconds given 3 attempts, its restart interval has been backed  
off to 600 seconds

Help me to understand above log message, please,

Thanks,  
Mohammad

---

<div class="post-metadata">

**Author:** ![Mohammad\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/8e8cbc/32.png) [@Mohammad\_K](https://www.ruby-forum.com/u/Mohammad_K)\
**Post date:** [March 2, 2006, 3:51pm UTC](https://www.ruby-forum.com/t/railsfcgihandler-nameerror/75484/4 "2006-03-02T15:51:45Z")

</div>

On 3/1/06, Mohammad K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> for 30 seconds given 3 attempts, its restart interval has been backed  
> off to 600 seconds

Until you get dispatch.fcgi to properly fail in the absense of a  
webserver I would not even experiment with the webserver.

Try to stop all apache / lighttpd webserver instances and then run  
“ruby dispatch.fcgi” again.

AIUI, dispatch.fcgi should be attempting to connect to a socket that  
is provided by the now non-existent webserver. Since the socket does  
not have a listener it should error out with the “Error 500: Internal  
Server Error” message that I stated before.

If dispatch.fcgi is simply exiting with no error message you still  
have something wrong in your fcgi setup that has nothing to do with  
apache/lighttpd.

At that point you will need to be posting what env. (OS, distro, etc.)  
you are working with and what you did to get your fcgi setup going.  
Getting fcgi setup seems to be very specific to the OS and distro. I  
have only set it up once and that is on a Suse 10.0 setup, so I’m not  
sure I’m the one to help.

FYI: AIUI, when things are working the webserver creates the sockets  
and establishes listens on them. Then the fcgi processes are started  
by the webserver in the background. They in turn connect to the  
sockets. The fcgi processes should be long lived (hours/days/weeks)  
and able to handle repeated requests for fcgi service from the  
webserver.

## Greg

Greg F.  
The Norcross Group  
Forensics for the 21st Century

---

<div class="post-metadata">

**Author:** ![Mohammad\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/8e8cbc/32.png) [@Mohammad\_K](https://www.ruby-forum.com/u/Mohammad_K)\
**Post date:** [March 2, 2006, 4:40pm UTC](https://www.ruby-forum.com/t/railsfcgihandler-nameerror/75484/5 "2006-03-02T16:40:20Z")

</div>

my ld.so.conf was just missing /usr/local/lib

thanks for your help,
