require 'net/ftp' ftp = Net::FTP.new("ftp.ruby-lang.org") ftp.login ftp.passive = true files = ftp.chdir("/pub/ruby") snapshot = "stable-snapshot.tar.gz" ftp.getbinaryfile(snapshot, snapshot) ftp.close