From: Josh Cheek Date: 2010-07-02T08:13:03+09:00 Subject: Re: AUDIO FILE DOWNLOAD IN RUBY --00032555f2aa6ba8ab048a5b9ccb Content-Type: text/plain; charset=ISO-8859-1 On Thu, Jul 1, 2010 at 12:25 PM, kevid wrote: > require 'net/http' > url = "http://stream.esvmedia.org/mp3-play/hw/19023001-19023006.mp3" > res = Net::HTTP.get_response(URI.parse(url)) > File.open('out.mp3','wb') do |f| > f.print(res.body) > end > > > i tried the code above but did not get it work. > > require 'open-uri' File.open 'hannity_and_hitchens.mov' , 'wb' do |file| file.print open(' http://onegoodmovemedia.org/movies/0705/hannity_hitchens_300.mov').read end --00032555f2aa6ba8ab048a5b9ccb--