BOFH sample from rubycookbook 
Author Message
 BOFH sample from rubycookbook

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)

    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



Sat, 23 Oct 2004 04:06:32 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Ruby-libgtop (and RubyCookbook, RAA)

2. rubycookbook

3. rubycookbook.org down for indeterminate time

4. what happened to rubycookbook site?

5. rubycookbook.org

6. ANN: Ruby shard Config.rb posted at RubyCookbook

7. rubycookbook.org opens new section for code

8. possible addition to rubycookbook.org

9. Bug in LV6 AI sample channel, sample channels?

10. AI Sample Channel VS AI Sample Channels??

11. Sample with an external clock with a SCXI 1140 (8 channel sample/hold amplifier)

12. Sampling rate drops immensely when I sample once in my...

 

 
Powered by phpBB® Forum Software