Amir F is true that you can use another HTTP client, such as RestClient or Faraday, but if you want to stick with the standard Ruby library, you can install your user agent:
url = URI.parse(proggit_url)
req = Net::HTTP::Get.new(proggit_url)
req.add_field('User-Agent', 'My User Agent Dawg')
res = Net::HTTP.start(url.host, url.port) {|http| http.request(req) }
res.body
source
share