Project

General

Profile

Actions

Bug #8113

closed

ArgumentError: cannot interpret as DNS name: nil

Added by jaz_lim (Jaz Lim) about 11 years ago. Updated about 11 years ago.

Status:
Closed
Target version:
-
ruby -v:
2.0.0p0
Backport:
[ruby-core:53500]

Description

Loading development environment (Rails 3.2.12)
irb(main):001:0> open("http://www.ruby-lang.org/") {|f|
irb(main):002:1* f.each_line {|line| p line}
irb(main):003:1> }
ArgumentError: cannot interpret as DNS name: nil
from /usr/local/lib/ruby/2.0.0/resolv.rb:1176:in create' from /usr/local/lib/ruby/2.0.0/resolv.rb:1022:in generate_candidates'
from /usr/local/lib/ruby/2.0.0/resolv.rb:1047:in resolv' from /usr/local/lib/ruby/2.0.0/resolv.rb:513:in each_resource'
from /usr/local/lib/ruby/2.0.0/resolv.rb:406:in each_address' from /usr/local/lib/ruby/2.0.0/resolv.rb:115:in block in each_address'
from /usr/local/lib/ruby/2.0.0/resolv.rb:114:in each' from /usr/local/lib/ruby/2.0.0/resolv.rb:114:in each_address'
from /usr/local/lib/ruby/2.0.0/resolv.rb:92:in getaddress' from /usr/local/lib/ruby/2.0.0/resolv.rb:43:in getaddress'
from /usr/local/lib/ruby/2.0.0/resolv-replace.rb:10:in getaddress' from /usr/local/lib/ruby/2.0.0/resolv-replace.rb:22:in initialize'
from /usr/local/lib/ruby/2.0.0/net/http.rb:877:in open' from /usr/local/lib/ruby/2.0.0/net/http.rb:877:in block in connect'
from /usr/local/lib/ruby/2.0.0/timeout.rb:51:in timeout' from /usr/local/lib/ruby/2.0.0/net/http.rb:876:in connect'
from /usr/local/lib/ruby/2.0.0/net/http.rb:861:in do_start' from /usr/local/lib/ruby/2.0.0/net/http.rb:850:in start'
from /usr/local/lib/ruby/2.0.0/open-uri.rb:313:in open_http' from /usr/local/lib/ruby/2.0.0/open-uri.rb:708:in buffer_open'
from /usr/local/lib/ruby/2.0.0/open-uri.rb:210:in block in open_loop' from /usr/local/lib/ruby/2.0.0/open-uri.rb:208:in catch'
from /usr/local/lib/ruby/2.0.0/open-uri.rb:208:in open_loop' from /usr/local/lib/ruby/2.0.0/open-uri.rb:149:in open_uri'
from /usr/local/lib/ruby/2.0.0/open-uri.rb:688:in open' from /usr/local/lib/ruby/2.0.0/open-uri.rb:34:in open'
from (irb):1
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.12/lib/rails/commands/console.rb:47:in start' from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.12/lib/rails/commands/console.rb:8:in start'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.12/lib/rails/commands.rb:41:in <top (required)>' from script/rails:6:in require'
from script/rails:6:in `'


Related issues 1 (0 open1 closed)

Related to Backport200 - Backport #8054: open-uri と resolv-replace を同時にロードすると壊れるClosednagachika (Tomoyuki Chikanaga)03/09/2013Actions

Updated by zzak (zzak _) about 11 years ago

I cannot reproduce this with: ruby 2.1.0dev (2013-03-18 trunk 39805)
[x86_64-linux]

$irb -ropen-uri
open("http://www.ruby-lang.org/") { |f| f.each_line { |line| p line } }

Could you try it without rails?

Updated by drbrain (Eric Hodel) about 11 years ago

  • Category set to lib
  • Status changed from Open to Closed
  • Assignee set to akr (Akira Tanaka)
  • ruby -v changed from 2.0.0 to 2.0.0p0

This was fixed by r39725. There is a backport ticket #8054

Actions

Also available in: Atom PDF

Like0
Like0Like0