Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Unable to connect to http
Pradeepta Swain
12/24/2007 9:14:00 AM
Hi
I am trying to get a webpage using this code
require 'net/http'
Net::HTTP.start('www.rubyinside.com') do |http|
req = Net::HTTP::Get.new('/test.txt')
puts http.request(req).body
end
I am using ruby1.8.4 on windows XP platform
but it is giving error like
c:/apps/ruby/lib/ruby/1.8/net/http.rb:560:in `initialize': Bad file
descriptor - connect(2) (Errno::EBADF)
from c:/apps/ruby/lib/ruby/1.8/net/http.rb:560:in `connect'
from c:/apps/ruby/lib/ruby/1.8/timeout.rb:48:in `timeout'
from c:/apps/ruby/lib/ruby/1.8/timeout.rb:76:in `timeout'
from c:/apps/ruby/lib/ruby/1.8/net/http.rb:560:in `connect'
from c:/apps/ruby/lib/ruby/1.8/net/http.rb:553:in `do_start'
from c:/apps/ruby/lib/ruby/1.8/net/http.rb:542:in `start'
from c:/apps/ruby/lib/ruby/1.8/net/http.rb:440:in `start'
from ft.rb:15
what should I do to run the program . please help me out ! It is not
fixed yet !should I update the version ?
regards
pradeepta
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Unable to connect to http
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password