# FastCGI issues

**URL:** <https://www.ruby-forum.com/t/fastcgi-issues/93752>\
**Category:** Rails\
**Created:** [April 8, 2006, 4:18pm UTC](https://www.ruby-forum.com/t/fastcgi-issues/93752 "2006-04-08T16:18:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Panait](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/71c47a/32.png) [@Alex\_Panait](https://www.ruby-forum.com/u/Alex_Panait)\
**Post date:** [April 8, 2006, 4:18pm UTC](https://www.ruby-forum.com/t/fastcgi-issues/93752/1 "2006-04-08T16:18:28Z")

</div>

I am attempting to get Rails running on Windows with an Apache 2 server.  
I seem to be having some trouble, and in spite of my best efforts to  
find a solution, I could not.

I believe that I configured Apache correctly. I have included

EnableSendfile Off  
EnableMMAP Off  
Win32DisableAcceptEx

FastCgiConfig -maxClassProcesses 1 -maxProcesses 1 -minProcesses 1  
-processSlack 1   
-initial-env  
PATH=“c:/ruby/bin;c:/windows/system32;c:/windows;C:/mysql/bin”   
-initial-env RUBYOPT=rubygems

in httpd.conf per this article:

[http://dema.ruby.com.br/articles/2005/08/23/taming-fastcgi-apache2-on-windows](http://dema.ruby.com.br/articles/2005/08/23/taming-fastcgi-apache2-on-windows)

As soon as I try to access any controller the harddrive starts grinding  
and Apache’s error log is spammed with

[Sat Apr 08 07:00:30 2006] [warn] FastCGI: (dynamic) server  
“C:/ruby/rails/mata/public/dispatch.fcgi” has failed to remain running  
for 30 seconds given 3 attempts, its restart interval has been backed  
off to 600 seconds

I have tried running dispatch.fcgi from the command line, as I’ve seen  
it suggested, in order to attempt to debug the problem. I get the  
following error:

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active\_support/dependencies.rb:200:in  
`const\_  
missing’: uninitialized constant RailsFCGIHandler (NameError)  
from ./dispatch.fcgi:24

The shebang line for dispatch.fcgi is

#!c:/ruby/bin/ruby

which is the correct location of the interpreter.

I hope the problem is that I overlooked something trivial - and if  
that’s the case, please feel free to bonk me over the head.

Thank you in advance for any suggestions!

Alex

---

<div class="post-metadata">

**Author:** ![Alex\_Panait](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/71c47a/32.png) [@Alex\_Panait](https://www.ruby-forum.com/u/Alex_Panait)\
**Post date:** [April 8, 2006, 4:48pm UTC](https://www.ruby-forum.com/t/fastcgi-issues/93752/2 "2006-04-08T16:48:40Z")

</div>

Looks like you missing FCGI support in Rails, you need to have fcgi.so  
as well as fcgi.rb in your Ruby librairies, and you also need a DLL  
called libfcgi.dll in your path.

You may want to try my Rail Prod Win setup kit:

> **[Rails Prod Machine for Win32](https://sourceforge.net/projects/rails-prod-win)**
>
> Download Rails Prod Machine for Win32 for free. Set of software/tools/libraries pre-compiled for Microsoft Windows platforms (WinXP,Win2000,Server2003), to allow easy deployement of a Ruby on Rails production machine. Includes Apache web server,...

It has everything you need to run FCGI with Apache 2.2 on Windows, you  
should be up and running in no time.

Gael

---

<div class="post-metadata">

**Author:** ![Alex\_Panait](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/71c47a/32.png) [@Alex\_Panait](https://www.ruby-forum.com/u/Alex_Panait)\
**Post date:** [April 8, 2006, 4:48pm UTC](https://www.ruby-forum.com/t/fastcgi-issues/93752/3 "2006-04-08T16:48:41Z")

</div>

Should read:  
Looks like you missing FCGI support in Ruby (not Rails)

---

<div class="post-metadata">

**Author:** ![Alex\_Panait](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/71c47a/32.png) [@Alex\_Panait](https://www.ruby-forum.com/u/Alex_Panait)\
**Post date:** [April 9, 2006, 8:38pm UTC](https://www.ruby-forum.com/t/fastcgi-issues/93752/4 "2006-04-09T20:38:04Z")

</div>

Thank you! I’m going to try this out!
