Using DRb on a Linux box

When trying to use DRb on my Linux box (SuSE 7.3 running Ruby 1.6.7), I
get

a SocketError indicating that getnameinfo: ai_family not supported.

According to the “Ruby Developer’s Guide”, page 337, the fix for this is
to

recompile Ruby with ./configure --enable-ipv6
–with-lookup-order-hack=INET.

I tried that and it didn’t work!!

Does that mean that the same “getnameinfo” error occured after recompiling
ruby?

Short answer: Yes, now here is why …

When I first built Ruby, I used “./configure” with no additional options.
When attempting to use a DRb client, I got a SocketError indicating that
getnameinfo: ai_family not supported. According to my trusty “Ruby
Developer’s Guide”, page 337, the fix for this is to recompile Ruby with
"./configure --enable-ipv6 --with-lookup-order-hack=INET", which I did.

 ./configure --enable-ipv6 --with-lookup-order-hack=INET
 make
 su root
 make install

I re-ran my test and it still failed with the same error.

Note: The appeared to be related to an empty host specified in the URL. If a
IP address of “0.0.0.0” was specified as the host, things seemed to work.

But what I had done wasn’t adequate, I realized what I had done was only to
re-compile “miniruby” and “ruby”. I wondered if this was enough so then I
did …

 make clean
 ./configure --enable-ipv6 --with-lookup-order-hack=INET
 make
 su root
 make install

Now when I ran my test, I got an “Address already in use” error. No matter
if a specified a host ip or “0.0.0.0”.

So is this correct? This doesn’t seem like the fix I was looking for.

···

On Sat, Aug 24, 2002 at 10:31AM, Michael Neumann wrote:

On Thu, Aug 22, 2002 at 11:25:17PM +0900, Dale Martenson wrote:

     make clean

Yes, this is the way to do it

     ./configure --enable-ipv6 --with-lookup-order-hack=INET
     make
     su root
     make install

Now when I ran my test, I got an "Address already in use" error. No matter
if a specified a host ip or "0.0.0.0".

So is this correct? This doesn't seem like the fix I was looking for.

Try just this, to see if it work

pigeon% ruby -rsocket -e 'p TCPServer.open(0)'
#<TCPServer:0x401b0040>
pigeon%

Guy Decoux