The simplest way could be this, it is almost the same as reading a file:
require "open-uri" url = "http://www.google.com/finance/historical?q=NYSE:SMH" url_data = open(url).read()
EDIT: it was an approach from a script. For the Rails approach, you can write a Rake task for this and run it periodically using a scheduled task.
source share