From: Jano Svitok Date: 2007-11-20T06:20:38+09:00 Subject: Re: Copy image from a website On Nov 19, 2007 7:00 PM, _Stud wrote: > I'm trying to copy an image from a website, but can't seem to get it > right. > > I know rio can copy a website in one line, but what about images? > Anyone have a good snippet using open-uri or something? web page = (virtual) file image = (virtual) file just use open-uri + read and write the contents somewhere. require 'open-uri' File.open('logo.gif', 'wb') do |f| f.write(open('http://www.google.com/intl/en_ALL/images/logo.gif').read) end J.