Following solutions will first read the whole content to memory before writing it to disc (for more i/o efficient solutions look at the other answers).
You can use open-uri, which is a one liner
require 'open-uri'
content = open('http://example.com').read
Or by using net/http
require 'net/http'
File.write("file_name", Net::HTTP.get(URI.parse("http://url.com")))