From: "Peña, Botp" Date: 2008-09-11T18:41:25+09:00 Subject: Re: How to check if a webpage exists From: Davide Benini [mailto:nutsmuggler@hotmail.com] # > try # > # > # require 'open-uri' # > # begin # > # open "www.does.not.exist.sdadasdas.com", :proxy=>true # > # > replace the above line with # > # > puts open("www.does.not.exist.sdadasdas.com",:proxy=>true).read # > # > post the output again # > # > # p "i'm ok" #<-- ok codes here # > # rescue => e # > # p "sorry can't do" # > # p "error is: #{e}" # > # end # # The output is # # "sorry can't do" # "error is: can't convert Hash into String" # # So now there is type conflict... because i just copied your url. try this, puts open("http://www.does.not.exist.sdadasdas.com",:proxy=>true).read