[Nitro] Lighttpd and Fastcgi, innovative work flow

Malte Milatz malte at gmx-topmail.de
Mon Jan 8 06:20:09 EST 2007


Jonathan Buch:
> Hi,
> 
> > /usr/lib/ruby/gems/1.8/gems/nitro-0.41.0/lib/nitro/adapter/fastcgi.rb:10: uninitialized constant Socket (NameError)
> 
> I might be completely off, but could it be that the pure ruby fastcgi
> lib had been loaded?  Did you install the fastcgi .so? (libfcgi0c2 package
> on debian)

Hm, interesting. I'm adding package details to the end of this mail.

> If the libfcgi.so.0 was already there, could you try installing the gem
> version of the fcgi lib and see what it does about the C ext?

When using the gem instead of the Ubunutu package, the only difference
I've noticed is that I had to pay attention to the load path order.
I.e., I had to replace my

	require 'fcgi'

with

	require 'fcgi.so'

because the first line would load public/fcgi.rb. So I did the
following:

	- rename fcgi.rb to dispatch_fcgi.rb
	  (require 'fcgi' won't work with public/fcgi.rb being present)

	- in conf/lhttpd.conf replace both occurences of fcgi.rb with 			
	  dispatch_fcgi.rb

	- still leave require 'socket' in the code

This works on my system both with the gem and with the Ubuntu package. I
still wonder why I have to require 'socket' on my own.

Package information:

malte at aligatoro:~$ apt-cache show libfcgi0
Package: libfcgi0
Priority: optional
Section: universe/libs
Installed-Size: 812
Maintainer: Tatsuki Sugiura <sugi at nemui.org>
Architecture: amd64
Source: libfcgi
Version: 2.4.0-5
Provides: libfcgi
Depends: libc6 (>= 2.3.2.ds1-4)
Filename: pool/universe/libf/libfcgi/libfcgi0_2.4.0-5_amd64.deb
Size: 280018
MD5sum: 4aca3794844cfa0dec2e97ae681b985c
Description: Shared library of FastCGI
 FastCGI is a language independent, scalable, open extension
 to CGI that provides high performance without the limitations
 of server specific APIs.
Bugs: mailto:ubuntu-users at lists.ubuntu.com
Origin: Ubuntu

malte at aligatoro:testmenow$ apt-cache show libfcgi-ruby1.8
Package: libfcgi-ruby1.8
Priority: optional
Section: universe/web
Installed-Size: 88
Maintainer: Tatsuki Sugiura <sugi at nemui.org>
Architecture: amd64
Source: libfcgi-ruby
Version: 0.8.6-1
Provides: libfcgi-ruby
Depends: libc6 (>= 2.3.4-1), libfcgi0, libruby1.8 (>= 1.8.2-5)
Filename:
pool/universe/libf/libfcgi-ruby/libfcgi-ruby1.8_0.8.6-1_amd64.deb
Size: 15730
MD5sum: b7b2e0db9877a8a1e296c7c8f00155c4
Description: FastCGI library for Ruby
 FastCGI is a language independent, scalable, open extension to CGI that
 provides high performance without the limitations of server specific
APIs.
 For more information, see http://www.fastcgi.com/.
 .
 This merges matz's C version(fcgi.so) & Eli's pure ruby
version(fastcgi.rb)
Bugs: mailto:ubuntu-users at lists.ubuntu.com
Origin: Ubuntu





More information about the Nitro-general mailing list