开发者

how do i connect to server using ror

开发者 https://www.devze.com 2023-01-10 13:07 出处:网络
c:/ruby/lib/ruby/1.8/net/http.rb:560:in `initialize\': getaddrinfo: no address a from c:/ruby/lib/ruby/1.8/net/http.rb:560:in `open\'
c:/ruby/lib/ruby/1.8/net/http.rb:560:in `initialize': getaddrinfo: no address a
        from c:/ruby/lib/ruby/1.8/net/http.rb:560:in `open'
        from c:/ruby/lib/ruby/1.8/net/http.rb:560:in `connect'
        from c:/ruby/lib/ruby/1.8/timeout.rb:48:in `timeout'
        from c:/ruby/lib/ruby/1.8/timeout.rb:76:in `timeout'
        from c:/ruby/lib/ruby/1.8/net/http.rb:560:in `connect'
        from c:/ruby/lib/ruby/1.8/net/http.rb:553:in `do_start'
        from c:/ruby/lib/ruby/1.8/net/http.rb:542:in `star开发者_开发知识库t'
        from c:/ruby/lib/ruby/1.8/net/http.rb:379:in `get_response'
        from ./run2.rb:23:in `get_streams'
        from ./run2.rb:117:in `search_streams'
        from main.rb:19

I'm getting this error when I tried to connect to the web server. Why is it so?


Maybe you are behind a proxy. getaddrinfo is used to resolve DNS Requests - but is the error message really "no address a" ?

Ruby Documentation of Net::HTTP (with examples)


The incomplete error message you're posting is likely "no address associated with hostname", which indicates that wherever you're trying to connect to isn't accessible from where you're at. Since the problem is at from ./run2.rb:23:in 'get_streams', can you print out the address you're trying to connect to and see if it in fact is reachable from your machine?

0

精彩评论

暂无评论...
验证码 换一张
取 消