# Getting fcgi to work

**URL:** <https://www.ruby-forum.com/t/getting-fcgi-to-work/56734>\
**Category:** Rails\
**Created:** [April 3, 2006, 1:39pm UTC](https://www.ruby-forum.com/t/getting-fcgi-to-work/56734 "2006-04-03T13:39:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jjkiesch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Post date:** [April 3, 2006, 1:39pm UTC](https://www.ruby-forum.com/t/getting-fcgi-to-work/56734/1 "2006-04-03T13:39:42Z")

</div>

can some one help me with my install? i’m having a touch time getting  
fcgi to play right with apache. i ran “gem install fcgi” and this is the  
output i get:

Attempting local installation of ‘fcgi’  
Local gem file not found: fcgi\*.gem  
Attempting remote installation of ‘fcgi’  
Updating Gem source index for: [http://gems.rubyforge.org](http://gems.rubyforge.org)  
Building native extensions. This could take a while…  
ruby extconf.rb install fcgi  
checking for fcgiapp.h… yes  
checking for FCGX\_Accept() in -lfcgi… yes  
creating Makefile

make  
gcc -fPIC -g -O2 -I. -I/usr/local/lib/ruby/1.8/i686-linux  
-I/usr/local/lib/ruby/1.8/i686-linux -I. -DHAVE\_FCGIAPP\_H -c fcgi.c  
gcc -shared -L’/usr/local/lib’ -Wl,-R’/usr/local/lib’ -o fcgi.so fcgi.o  
-lfcgi -ldl -lcrypt -lm -lc

make install  
/usr/bin/install -c -m 0755 fcgi.so  
/usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.6.1/.  
Successfully installed fcgi-0.8.6.1  
Installing RDoc documentation for fcgi-0.8.6.1…

No definition for fcgi\_s\_accept

No definition for fcgi\_s\_each

No definition for fcgi\_s\_each

No definition for fcgi\_s\_iscgi

No definition for fcgi\_in

No definition for fcgi\_out

No definition for fcgi\_err

No definition for fcgi\_env

No definition for fcgi\_finish

No definition for fcgi\_stream\_putc

No definition for fcgi\_stream\_write

No definition for fcgi\_stream\_print

No definition for fcgi\_stream\_printf

No definition for fcgi\_stream\_puts

No definition for fcgi\_stream\_addstr

No definition for fcgi\_stream\_flush

No definition for fcgi\_stream\_getc

No definition for fcgi\_stream\_ungetc

No definition for fcgi\_stream\_gets

No definition for fcgi\_stream\_read

No definition for fcgi\_stream\_eof

No definition for fcgi\_stream\_eof

No definition for fcgi\_stream\_close

No definition for fcgi\_stream\_closed

No definition for fcgi\_stream\_binmode

No definition for fcgi\_stream\_isatty

No definition for fcgi\_stream\_isatty

No definition for fcgi\_stream\_sync

No definition for fcgi\_stream\_setsync

am i supposed to get those no definition messages? are those errors or  
what? this is what i get when trying to run my rails apps with fcgi:

/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active\_support/dependencies.rb:112:in  
`const_missing': uninitialized constant RailsFCGIHandler (NameError) from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active_support/dependencies.rb:120:in `const\_missing’  
from /home/mymedia/public\_html/rails/dispatch.fcgi:26  
[Mon Apr 3 01:16:03 2006] [warn] FastCGI: (dynamic) server  
“/home/mymedia/public\_html/rails/dispatch.fcgi” (pid 28269) terminated  
by calling exit with status ‘1’  
[Mon Apr 3 01:16:06 2006] [warn] FastCGI: (dynamic) server  
“/home/mymedia/public\_html/rails/dispatch.fcgi” restarted (pid 28270)  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active\_support/dependencies.rb:112:in  
`const_missing': uninitialized constant RailsFCGIHandler (NameError) from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active_support/dependencies.rb:120:in `const\_missing’  
from /home/mymedia/public\_html/rails/dispatch.fcgi:26  
[Mon Apr 3 01:16:08 2006] [warn] FastCGI: (dynamic) server  
“/home/mymedia/public\_html/rails/dispatch.fcgi” (pid 28270) terminated  
by calling exit with status ‘1’

i have no idea what any of this means. if anyone can help me out or  
point me in the right direction, that would be great!

thanks,  
josh

---

<div class="post-metadata">

**Author:** ![jjkiesch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Post date:** [April 3, 2006, 5:06pm UTC](https://www.ruby-forum.com/t/getting-fcgi-to-work/56734/2 "2006-04-03T17:06:45Z")

</div>

Am Montag, den 03.04.2006, 13:39 +0200 schrieb Josh K.:

> checking for fcgiapp.h… yes  
> /usr/bin/install -c -m 0755 fcgi.so  
> No definition for fcgi\_s\_iscgi
> 
> No definition for fcgi\_stream\_addstr
> 
> No definition for fcgi\_stream\_isatty  
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active\_support/dependencies.rb:112:in  
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active\_support/dependencies.rb:112:in  
> point me in the right direction, that would be great!  
> On what Platform are you working? Debian? Try out this HowTo:

[http://blog.inlet-media.de/the-perfect-ruby-on-rails-with-apache2-and-fastcgi-setup-on-debian-sarge](http://blog.inlet-media.de/the-perfect-ruby-on-rails-with-apache2-and-fastcgi-setup-on-debian-sarge)

–  
Norman T.

[http://blog.inlet-media.de](http://blog.inlet-media.de)

---

<div class="post-metadata">

**Author:** ![jjkiesch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Post date:** [April 3, 2006, 5:18pm UTC](https://www.ruby-forum.com/t/getting-fcgi-to-work/56734/3 "2006-04-03T17:18:46Z")

</div>

> On what Platform are you working? Debian? Try out this HowTo:
> 
> [http://blog.inlet-media.de/the-perfect-ruby-on-rails-with-apache2-and-fastcgi-setup-on-debian-sarge](http://blog.inlet-media.de/the-perfect-ruby-on-rails-with-apache2-and-fastcgi-setup-on-debian-sarge)
> 
> –  
> Norman T.
> 
> [http://blog.inlet-media.de](http://blog.inlet-media.de)

i’m using RedHat. i have a dedicated server with [hostgator.com](http://hostgator.com)  
i’m running apache 1.3.4 i believe. what changes on this would i need to  
make for apache 1.3?

---

<div class="post-metadata">

**Author:** ![jjkiesch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Post date:** [April 3, 2006, 6:26pm UTC](https://www.ruby-forum.com/t/getting-fcgi-to-work/56734/4 "2006-04-03T18:26:13Z")

</div>

Josh K. wrote:

> can some one help me with my install? i’m having a touch time getting  
> fcgi to play right with apache. i ran “gem install fcgi” and this is the  
> output i get:
> 
> Attempting local installation of ‘fcgi’  
> …

FWIW, I had _exactly_ the same problem with the fcgi constant on OsX.  
Even stranger, I have two macs with what I _think_ are identical setups  
and I DON’T have the problem on one of them! Probably why I switched to  
mongrel at least for the time being… 🙂  
Very frustrating, to say the least.  
Keith

---

<div class="post-metadata">

**Author:** ![jjkiesch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Post date:** [April 3, 2006, 5:40pm UTC](https://www.ruby-forum.com/t/getting-fcgi-to-work/56734/5 "2006-04-03T17:40:39Z")

</div>

Am Montag, den 03.04.2006, 17:18 +0200 schrieb Josh K.:

> > On what Platform are you working? Debian? Try out this HowTo:
> > 
> > [http://blog.inlet-media.de/the-perfect-ruby-on-rails-with-apache2-and-fastcgi-setup-on-debian-sarge](http://blog.inlet-media.de/the-perfect-ruby-on-rails-with-apache2-and-fastcgi-setup-on-debian-sarge)
> 
> i’m using RedHat. i have a dedicated server with [hostgator.com](http://hostgator.com)  
> i’m running apache 1.3.4 i believe. what changes on this would i need to  
> make for apache 1.3?

Sorry, i have no experience with RedHat or Apache 1.3, but the general  
recipe should be the same as described in the howto.

–  
Norman T.

[http://blog.inlet-media.de](http://blog.inlet-media.de)

---

<div class="post-metadata">

**Author:** ![jjkiesch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Post date:** [April 3, 2006, 9:35pm UTC](https://www.ruby-forum.com/t/getting-fcgi-to-work/56734/6 "2006-04-03T21:35:48Z")

</div>

/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active\_support/dependencies.rb:112:in

> > point me in the right direction, that would be great!  
> > On what Platform are you working? Debian? Try out this HowTo:
> 
> [http://blog.inlet-media.de/the-perfect-ruby-on-rails-with-apache2-and-fastcgi-setup-on-debian-sarge](http://blog.inlet-media.de/the-perfect-ruby-on-rails-with-apache2-and-fastcgi-setup-on-debian-sarge)
> 
> –  
> Norman T.
> 
> [http://blog.inlet-media.de](http://blog.inlet-media.de)

i’m trying to install the mod\_fcgi. in the tutorial it says to use  
Makefile.AP2, but with apache 133 what make file should i use.

---

<div class="post-metadata">

**Author:** ![jjkiesch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Post date:** [April 4, 2006, 12:02am UTC](https://www.ruby-forum.com/t/getting-fcgi-to-work/56734/7 "2006-04-04T00:02:25Z")

</div>

sry bout the last post. noob mistake. i still haven’t had any luck  
though. on thing i did try in your tutorial was running the  
dispatch.fcgi script from the shell line. i get the following errors:

/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active\_support/dependencies.rb:112:in  
`const_missing': uninitialized constant RailsFCGIHandler (NameError) from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active_support/dependencies.rb:120:in`const\_missing’  
from …/newtest/public/dispatch.fcgi:24

based on that, can anyone tell me what i’m doing wrong? is it my  
configuration? installation maybe?
