Ruby request to https - “in `read_nonblock': Connection reset by peer (Errno::ECONNRESET)”
问题 Here is my code domain = 'http://www.google.com' url = URI.parse "https://graph.facebook.com/fql?q=SELECT%20url,normalized_url%20FROM%20link_stat%20WHERE%20url='#{domain}'" req = Net::HTTP::Get.new url.path res = Net::HTTP.start(url.host, url.port) {|http| http.request req} puts res.body and it gives me /home/alex/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/net/protocol.rb:153:in `read_nonblock': Connection reset by peer (Errno::ECONNRESET) from /home/alex/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0