From: Gregory Brown Date: 2007-01-13T05:56:21+09:00 Subject: Re: Problem with open-uri On 1/12/07, David Sulc wrote: > Hi ! > > I'm unable to open certain URIs with open-uri. Here is the code : > > require 'rexml/document' > require 'open-uri' > xml = REXML::Document.new(open("http://myoms.net/soap/oms2.wsdl")) > > The error I get is : > > /usr/lib/ruby/1.8/rexml/parsers/baseparser.rb:133:in `stream=': Tempfile > is not a valid input stream. It must be (RuntimeError) > either a String, IO, StringIO or Source. > > I have tried to "cast" the parameter to IO with to_io, but it still > doesn't work. Any ideas ? if it works on strings just do open("http://myurl.com").read