Re: net/protocol.rb & Name or service not known (SocketError)
Detlef Reichl <[email protected]> Wed, 23 Feb 2005 20:29:32 +0100
| Newsgroups | gmane.comp.lang.ruby.german |
|---|---|
| Message-ID | <[email protected]> |
On Mi, 2005-02-23 at 20:07 +0100, robert kuzelj wrote:
>hi,
>
>hab gerade ein kleines (grosses) problem beim zugriff
>auf eine http-url. ich bekomme immer folgende stacktrace unter
>linux
hallo,
>das programm dazu ist simple genug
>require 'net/http'
>
>h = Net::HTTP.new('http://www.yahoo.com', 8080)
sollte sein:
h = Net::HTTP.new('www.yahoo.com', 8080)
>resp, data = h.get('/index.html', nil )
und
resp = h.get('/index.html')
>puts "Code = #{resp.code}"
>puts "Message = #{resp.message}"
>
>irgendeiner irgendeine idee?
>
gruss
detlef