EOFError: end of file reached issue with Net::HTTP
If the URL is using https instead of http, you need to add the following line: parsed_url = URI.parse(url) http = Net::HTTP.new(parsed_url.host, parsed_url.port) http.use_ssl = true Note the additional http.use_ssl = true. And the more appropriate code which would handle both http and https will be similar to the following one. url = URI.parse(domain) req … Read more