From: brian.wil.greene@... Date: 2007-06-28T23:20:02+09:00 Subject: Bad file descriptor error using Net::HTTP I am trying to access a .net page via my ruby app and pass it a couple parameters. Every thing I have tried has resulted in this Bad file descriptor, I am wondering if it is something wrong with my configuration, not the code. Here is the code that is causing problems: Net::HTTP.version_1_2 Net::HTTP.start('www.url.com', 80) { |http| response = http.post('/DoSomething.aspx', 'id=#{params[:id]}&path=#{params[:imagerecord]}', { 'Content-Type' => 'application/x-www-form- urlencoded' }) puts response.body() } Here is the error I get: Errno::EBADF (Bad file descriptor - connect(2)): c:/ruby/lib/ruby/1.8/net/http.rb:560:in `initialize' c:/ruby/lib/ruby/1.8/net/http.rb:560:in `connect' c:/ruby/lib/ruby/1.8/timeout.rb:48:in `timeout' c:/ruby/lib/ruby/1.8/timeout.rb:76:in `timeout' c:/ruby/lib/ruby/1.8/net/http.rb:560:in `connect' c:/ruby/lib/ruby/1.8/net/http.rb:553:in `do_start' c:/ruby/lib/ruby/1.8/net/http.rb:542:in `start' c:/ruby/lib/ruby/1.8/net/http.rb:440:in `start' I am on Windows 2003 serer with Ruby 1.8.4 and Mongrel. Any help would be greatly appreciated.