views:

454

answers:

1

I have successful executed following commands:

tar xzvf fcgi-2.4.0.tar.gz
cd fcgi-2.4.0
./configure --prefix=/usr/local/fcgi
make && make install


tar xzvf ruby-fcgi-0.8.7.tar.gz
cd ruby-fcgi-0.8.7
ruby install.rb config -- --with-fcgi-include=/usr/local/fcgi/include --with-fcgi-lib=/usr/local/fcgi/lib


But I get this error when I run setup script:

ruby install.rb setup

install.rb: entering setup phase...
---> lib
<--- lib
---> ext
---> ext/fcgi
make
gcc -I. -I/usr/local/ruby/include/ruby-1.9.1/i686-linux -I/usr/local/ruby/include/ruby-1.9.1/ruby/backward -I/usr/local/ruby/include/ruby-1.9.1 -I/root/ruby-fcgi-0.8.6/ext/fcgi -DHAVE_FCGIAPP_H  -D_FILE_OFFSET_BITS=64  -fPIC  -O2 -g -Wall -Wno-parentheses  -o fcgi.o -c fcgi.c
fcgi.c: In function `fcgi_stream_write':
fcgi.c:215: error: structure has no member named `ptr'
fcgi.c:215: error: structure has no member named `len'
fcgi.c: In function `fcgi_stream_puts_ary':
fcgi.c:264: error: structure has no member named `len'
fcgi.c:265: error: structure has no member named `ptr'
fcgi.c:266: warning: implicit declaration of function `rb_inspecting_p'
fcgi.c: In function `fcgi_stream_puts':
fcgi.c:290: warning: implicit declaration of function `rb_protect_inspect'
fcgi.c:298: error: structure has no member named `ptr'
fcgi.c:298: error: structure has no member named `len'
fcgi.c: In function `fcgi_stream_gets':
fcgi.c:372: error: structure has no member named `len'
fcgi.c: In function `fcgi_s_accept':
fcgi.c:85: warning: statement with no effect
make: *** [fcgi.o] 错误 1
setup failed
'system make' failed
try 'ruby install.rb --help' for usage
A: 

I'm pretty sure ruby-fcgi does not work with Ruby 1.9. It was released in 2006.

Anthony Lewis
Thanks! I'm going to try this: http://blog.rubyists.com/2009/06/02/ruby-fcgi-on-1-9-x
Dexter.Yy