Resolv.getaddress("http://www.google.co.uk") does not work on Windows
---------------------------------------------------------------------
Key: JRUBY-3480
URL: http://jira.codehaus.org/browse/JRUBY-3480
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.1.4
Environment: Windows
Reporter: Praful Kapadia
Priority: Minor
Resolv.getaddress("http://www.google.co.uk") does not work. The following error
occurs:
C:/Program Files/NetBeans 6.5/ruby2/jruby-1.1.4/lib/ruby/1.8/resolv.rb:299:in
`open': No such file or directory - File not found - /etc/hosts (Errno::ENOENT)
Looking at the code for resolv.rb, I see the following:
if /mswin32|cygwin|mingw|bccwin/ =~ RUBY_PLATFORM
require 'win32/resolv'
DefaultFileName = Win32::Resolv.get_hosts_path
else
DefaultFileName = '/etc/hosts'
end
Given that RUBY_PLATFORM is java for JRuby, the DefaultFileName is going to be
set to /etc/hosts, which does not exist on Windows.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email