Join GitHub today
Resolv.getaddress fails w/ 'connect: name or service not known' on Windows #773
Don't know if this related to #580, but it's the same method that fails... Running this:
...gives me the following output on Windows 8, x64:
On OSX, this works and gives me 184.108.40.206.
(Using ping or nslookup on command line in Windows works and gives me that same IP address.)
referenced this issue
May 28, 2013
It looks like the resolv.rb library does have logic to use some Windows-specific logic, but only for finding the hosts file:
class Hosts if /mswin|mingw|bccwin/ =~ RUBY_PLATFORM || ::RbConfig::CONFIG['host_os'] =~ /mswin/ require 'win32/resolv' DefaultFileName = Win32::Resolv.get_hosts_path else DefaultFileName = '/etc/hosts' end ...
The logic for resolv.conf does not use 'host_os' to determine Windows. I will have a fix shortly.