Net HTTP get response EOF error?

I am trying to access a url: using:

uri = URI.parse(link)
response = Net::HTTP.get_response(uri)

I am getting an EOF: end of file error in both my app and in irb.

However, I can connect with a browser and using wget.

Any ideas on what is causing this problem?

Thank you,