Don't know if this related to #580, but it's the same method that fails... Running this:
> jruby -e "require 'resolv'; puts Resolv.getaddress 'www.jruby.org';"
...gives me the following output on Windows 8, x64:
SocketError: connect: name or service not known
connect at org/jruby/ext/socket/RubyUDPSocket.java:193
initialize at c:/jruby-1.7.4/lib/ruby/1.9/resolv.rb:766
make_udp_requester at c:/jruby-1.7.4/lib/ruby/1.9/resolv.rb:537
each_resource at c:/jruby-1.7.4/lib/ruby/1.9/resolv.rb:495
each_address at c:/jruby-1.7.4/lib/ruby/1.9/resolv.rb:391
each_address at c:/jruby-1.7.4/lib/ruby/1.9/resolv.rb:115
each at org/jruby/RubyArray.java:1617
each_address at c:/jruby-1.7.4/lib/ruby/1.9/resolv.rb:114
getaddress at c:/jruby-1.7.4/lib/ruby/1.9/resolv.rb:92
getaddress at c:/jruby-1.7.4/lib/ruby/1.9/resolv.rb:43
(root) at -e:1
On OSX, this works and gives me 188.8.131.52.
(Using ping or nslookup on command line in Windows works and gives me that same IP address.)
Also getting this problem - any thoughts on what the problem?
It looks like the resolv.rb library does have logic to use some Windows-specific logic, but only for finding the hosts file:
if /mswin|mingw|bccwin/ =~ RUBY_PLATFORM || ::RbConfig::CONFIG['host_os'] =~ /mswin/
DefaultFileName = Win32::Resolv.get_hosts_path
DefaultFileName = '/etc/hosts'
The logic for resolv.conf does not use 'host_os' to determine Windows. I will have a fix shortly.
Test for Windows correctly on JRuby. Fixes #773.
Just grabbed 1.7.5-dev/HEAD and it works for me :) Many thanks for that.