You can get the HTML by using the NET::HTTP library within Ruby
url = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(url.path)
res = Net::HTTP.start(url.host, url.port) {|http|
http.request(req)
}
body_html = res.body
You can then save body_html
into your database object.
The catch is that this returns the html that the client would get. In the "real" world, the browser then parses this HTML and then makes separate HTTP get requests for the stylesheets, scripts, images. You'd need to do the same thing and then store those in separate database objects.
This question gives you some tools that might help with the parsing part: Method to parse HTML document in Ruby?
Word of Warning: I suspect that what you're trying to do is going to be a lot harder than you think. Give some good thought to what you're really trying to accomplish and if this is the best method for getting there.