Hi,
I was trying the BOFH sample from the ruby cookbook and it's working with
the windows ruby version but it fails under cygwin with the error :
$ ./bofh.rb
./bofh.rb:8:in `initialize': getaddrinfo: invalid value for hints.
(SocketError)
from ./bofh.rb:8:in `new'
from ./bofh.rb:8:in `initialize'
from ./bofh.rb:14:in `new'
from ./bofh.rb:14
The bofh.rb is :
#!/usr/local/bin/ruby
require "net/http"
class BOFH
attr :excuse
def initialize
t = TCPSocket.new('bofh.jive.org', 666)
mumble, @excuse = t.readlines[3].split(': ')
t.close
end
end
puts BOFH.new.excuse
My "windows ruby" is ruby 1.7.2 (2002-03-20) [i386-mswin32] and the cygwin
one ruby 1.7.2 (2002-03-29) [i686-cygwin]. Any hints ? (I also have the cyg
updated to the latest version)...
Thanks a lot
philip