if you have openuri required just remove the File that should work or uri = URI.parse("http://somewhere.com/default.aspx") uri.open do |f| #some logic here end
or you could just use open("http://somewhere.com/default.aspx") do |f| # some logic here end taken from http://www.ruby-doc.org/stdlib/libdoc/open-uri/rdoc/classes/OpenURI.html --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Wed, Jun 17, 2009 at 4:34 PM, Mohammad Azam <li...@ruby-forum.com> wrote: > > I am using the following code to scrape the webpage. > > button = Button.new > button.Text = 'Scrape URL' > button.Location = System::Drawing::Point.new(108,61) > button.click do |sender,args| > > page = File.open("http://www.azamsharp.com/Default.aspx") > System::Windows::Forms::MessageBox.Show(page.read) > > end > > I get the following error message: > > Invalid argument - URI formats are not supported > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core@rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core >
_______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core