From: Dido Sevilla Date: 2006-10-05T17:17:18+09:00 Subject: Problem with sockets in Ruby 1.8.5 I've just updated to Ruby 1.8.5 and tried using Webrick for a little application. Funny thing was if I didn't specify a bind address, Webrick crashed with a SocketError. I isolated the code that causes this problem, and it turns out to be a Socket::getaddrinfo call: $ ruby -ve 'require "socket"; Socket::getaddrinfo(nil, 12345, Socket::AF_UNSPEC, Socket::SOCK_STREAM, 0, Socket::AI_PASSIVE)' ruby 1.8.5 (2006-08-25) [i686-linux] -e:1:in `getaddrinfo': getnameinfo: ai_family not supported (SocketError) from -e:1 No such problems on Ruby 1.9 (2006-09-29) or Ruby 1.8.2 (2004-12-25) or Ruby 1.8.4 (2005-12-24). I'm on Gentoo Linux. Apparently the bind address must be set to some address (0.0.0.0 works just fine), but it cannot be nil. Since it appears that lots of existing code using the Socket library doesn't set an explicit bind address as required here, it seems that updating to 1.8.5 might cause lots of breakage.