require 'net/sftp'begin Net::SFTP.start('host', 'username', :password => 'password') do |sftp| sftp.download!("/path/to/remote", "/path/to/local") #File thats not there endrescue Exception => e puts "CAUGHT!" raise eend
Standard input is empty
Standard output is empty
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- net/sftp (LoadError) from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from prog.rb:1:in `<main>'
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!