From: Daniel Berger Date: 2007-06-29T01:27:20+09:00 Subject: Re: Bad file descriptor error using Net::HTTP On Jun 28, 9:20 am, brian.wil.gre...@gmail.com wrote: > On Jun 28, 10:57 am, Daniel Berger wrote: > > > I am on Windows 2003 serer with Ruby 1.8.4 and Mongrel. Any help would > > > be greatly appreciated. > > > Line 560 of net/http.rb is this: > > > s = timeout(@open_timeout) { TCPSocket.open(conn_address(), > > conn_port()) } > > > What happens when you run this standalone snippet? > > > require 'socket' > > require 'timeout' > > > s = Timeout.timeout(5){ > > TCPSocket.open(url, 80) > > > } > > > p s > > > s.close > > > Regards, > > > Dan > > Dan, > > Thanks. Here is the error I get when executing the above code: > > Timeout::Error (execution expired): > c:/ruby/lib/ruby/1.8/timeout.rb:54:in `open' > c:/ruby/lib/ruby/1.8/timeout.rb:56:in `timeout' > > I know it's a valid URL. The page I am trying to access is sitting on > the same box as my rails app. That's peculiar. Firewall or proxy issue perhaps? Maybe you need rubysspi? http://rubyforge.org/projects/rubysspi/ Otherwise, I'm at a loss. Regards, Dan