If ruby-1.8.5 is compiled without IPV6, running gem_server will generate the following error: 2006-09-04 16:49:30] INFO WEBrick 1.3.1 [2006-09-04 16:49:30] INFO ruby 1.8.5 (2006-08-25) [i686-linux] /usr/lib/ruby/1.8/webrick/utils.rb:63:in `getaddrinfo': getnameinfo: ai_family not supported (SocketError) from /usr/lib/ruby/1.8/webrick/utils.rb:63:in `create_listeners' from /usr/lib/ruby/1.8/webrick/server.rb:75:in `listen' from /usr/lib/ruby/1.8/webrick/server.rb:63:in `initialize' from /usr/lib/ruby/1.8/webrick/httpserver.rb:24:in `initialize' from /usr/bin/gem_server:351:in `new' from /usr/bin/gem_server:351 The cause is this line in /usr/lib/ruby/1.8/webrick/utils.rb: res = Socket::getaddrinfo(address, port, Socket::AF_UNSPEC, # address family Socket::SOCK_STREAM, # socket type 0, # protocol Socket::AI_PASSIVE) # flag The problem is the Socket::AF_UNSPEC which is apparently causing getaddrinfo to try some IPv6 processing. What is needed is when -IPV6, to replace Socket::AF_UNSPEC with Socket::AF_INET to restrict getaddrinfo to IPv4: res = Socket::getaddrinfo(address, port, Socket::AF_INET, # address family Socket::SOCK_STREAM, # socket type 0, # protocol Socket::AI_PASSIVE) # flag
Can you file a bug at the ruby bugs site so they can fix this directly in ruby? I think the URL is http://rubyforge.org/tracker/?func=add&group_id=426&atid=1698
(In reply to comment #1) > Can you file a bug at the ruby bugs site so they can fix this directly in ruby? Filed at http://rubyforge.org/tracker/index.php?func=detail&aid=5627&group_id=426&atid=1698
(In reply to comment #2) > (In reply to comment #1) > > Can you file a bug at the ruby bugs site so they can fix this directly in ruby? > > Filed at > http://rubyforge.org/tracker/index.php?func=detail&aid=5627&group_id=426&atid=1698 > Closed as UPSTREAM. I don't think we have time for this bug in the moment.