ruby code to figure out url to download