# Install fcgi 0.8.8 on Ruby-1.8

**URL:** <https://www.ruby-forum.com/t/install-fcgi-0-8-8-on-ruby-1-8/185936>\
**Category:** Ruby\
**Created:** [March 29, 2010, 2:20pm UTC](https://www.ruby-forum.com/t/install-fcgi-0-8-8-on-ruby-1-8/185936 "2010-03-29T14:20:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gorkimaximum](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/e480ec/32.png) [@gorkimaximum](https://www.ruby-forum.com/u/gorkimaximum)\
**Post date:** [March 29, 2010, 2:20pm UTC](https://www.ruby-forum.com/t/install-fcgi-0-8-8-on-ruby-1-8/185936/1 "2010-03-29T14:20:38Z")

</div>

Hello,

I have tried to install the gem fcgi-0.8.8 for Ruby on Windows-Xp. I  
have installed Fastcgi Development Kit on C:\fcgi directory and i have  
compiled the source.

The source for fcgi is in “C:\fcgi\include” directory , and the  
libfcgi.dll is in “c:\fcgi\libfcgi\release” directory.

When i try to install fcgi gem for ruby , i get the next error:

C:\Documents and Settings\USER\>gem install fcgi -v 0.8.8 –  
–with-fcgi-include=c:/fcgi/include  
–with-fcgi-lib=c:/fcgi/libfcgi/release --remote  
Building native extensions. This could take a while…  
ERROR: Error installing fcgi:  
ERROR: Failed to build gem native extension.

C:/Ruby/bin/ruby.exe extconf.rb --with-fcgi-include=c:/fcgi/include  
–with-fcgi-lib=c:/fcgi/libfcgi/release --remote  
checking for fcgiapp.h… yes  
checking for FCGX\_Accept() in -lfcgi… yes  
creating Makefile

make  
gcc -I. -I. -IC:/Ruby/lib/ruby/1.8/i386-mingw32 -I. -DHAVE\_FCGIAPP\_H  
-Ic:/fcgi/include -g -O2 -c fcgi.c  
fcgi.c: In function `fcgi_s_accept': fcgi.c:82: error:`F\_GETFL’ undeclared (first use in this function)  
fcgi.c:82: error: (Each undeclared identifier is reported only once  
fcgi.c:82: error: for each function it appears in.)  
make: \*\*\* [fcgi.o] Error 1

Gem files will remain installed in  
C:/Ruby/lib/ruby/gems/1.8/gems/fcgi-0.8.8 for inspection.  
Results logged to  
C:/Ruby/lib/ruby/gems/1.8/gems/fcgi-0.8.8/ext/fcgi/gem\_make.out

C:\Documents and Settings\USER\>

So, i think i have missed any other global option for install the gem.I  
don’t know why the F\_GETFL (function or variable) is undeclared. Can  
someone help me?.

Thank you

Javier A…

---

<div class="post-metadata">

**Author:** ![gorkimaximum](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/e480ec/32.png) [@gorkimaximum](https://www.ruby-forum.com/u/gorkimaximum)\
**Post date:** [March 29, 2010, 10:40pm UTC](https://www.ruby-forum.com/t/install-fcgi-0-8-8-on-ruby-1-8/185936/2 "2010-03-29T22:40:36Z")

</div>

Didn’t you ask the same question before?  
[http://www.ruby-forum.com/topic/205680](http://www.ruby-forum.com/topic/205680)

Just install fcgi.rb and use it in its “pure ruby” mode. (That is, if it  
can’t load the C extension, it will implement the fcgi protocol in ruby  
instead. No C required).

---

<div class="post-metadata">

**Author:** ![gorkimaximum](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/e480ec/32.png) [@gorkimaximum](https://www.ruby-forum.com/u/gorkimaximum)\
**Post date:** [March 30, 2010, 4:51pm UTC](https://www.ruby-forum.com/t/install-fcgi-0-8-8-on-ruby-1-8/185936/3 "2010-03-30T16:51:38Z")

</div>

Javier A. wrote:

> The questions is, that i don’t know how to make what you’re saying.

Sorry if I wasn’t being clear. I simply meant copy fcgi.rb to your ruby  
lib directory, or into your own application’s lib directory.

> Please watch my operating system is Windoes-Xp, and when y tried to  
> directly execute fcgi.rb in ruby , always i get the next error:
> 
> C:/Ruby/lib/ruby/site\_ruby/1.8/fcgi.rb:11:in `trap’: unsupported signal  
> SIGPIPE (ArgumentError)  
> from C:/Ruby/lib/ruby/site\_ruby/1.8/fcgi.rb:11  
> from

OK, then that’s a POSIX signal which doesn’t exist in Windows. You’ll  
need to trim references to this out of the code.

However it does suggest that fcgi.rb hasn’t been tested much (if at all)  
under Windows. Maybe a cygwin build of ruby would be closer to what it  
expects.

Otherwise, I suggest you do what most people do nowadays, and run your  
web service as a standalone process (using mongrel, thin, unicorn etc)  
and proxy to it from your apache instance using mod\_proxy. With a  
suitable config you can get static assets served directly from apache.

---

<div class="post-metadata">

**Author:** ![gorkimaximum](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/e480ec/32.png) [@gorkimaximum](https://www.ruby-forum.com/u/gorkimaximum)\
**Post date:** [March 30, 2010, 4:39pm UTC](https://www.ruby-forum.com/t/install-fcgi-0-8-8-on-ruby-1-8/185936/4 "2010-03-30T16:39:25Z")

</div>

Hello, Brian, thank you by your answer.

The questions is, that i don’t know how to make what you’re saying.  
Please watch my operating system is Windoes-Xp, and when y tried to  
directly execute fcgi.rb in ruby , always i get the next error:

C:/Ruby/lib/ruby/site\_ruby/1.8/fcgi.rb:11:in `trap': unsupported signal SIGPIPE (ArgumentError) from C:/Ruby/lib/ruby/site_ruby/1.8/fcgi.rb:11 from C:/Ruby/lib/ruby/site_ruby/1.8rubygems/custom_require.rb:31:in `gem\_original\_require’  
from  
C:/Ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:31:in  
`require’  
from -:3

I have tried to install over Ruby19, but things have been even worse.So  
i have returned to install Ruby-1.86 (In Ruby1.9.1 i can’t start  
mongrel\_rails and always get a buffer or cache error).

I have observed that one difference between an installed gem and a  
uninstalled is that in C.\ruby\lib\ruby\gems\1.8\specifications, in case  
of a installed gem exist the corr file to the extension gem and in case  
of uninstalled don’t.

Please. if you can show me how to install the pure fcgi.rb in a way that  
it work for Apache2.2 in Windows-Xp, i will thank you so much.

Javier A…

Brian C. wrote:

> Didn’t you ask the same question before?  
> [Install fcgi-ruby for Apache on Windows Xp - Ruby - Ruby-Forum](http://www.ruby-forum.com/topic/205680)
> 
> Just install fcgi.rb and use it in its “pure ruby” mode. (That is, if it  
> can’t load the C extension, it will implement the fcgi protocol in ruby  
> instead. No C required).
