I've been doing some testing using open-uri but when my server returned an http 500 all I got on the ruby side was an Open::HTTPError. In order to view the actual error page returned by the server I needed to do something like this:
begin
resp = open(URL)
puts "Finished"
rescue OpenURI::HTTPError => err
puts "Failed"
puts err.io.readlines
end