fork download
  1. require 'net/sftp'
  2. begin
  3. Net::SFTP.start('host', 'username', :password => 'password') do |sftp|
  4. sftp.download!("/path/to/remote", "/path/to/local") #File thats not there
  5. end
  6. rescue Exception => e
  7. puts "CAUGHT!"
  8. raise e
  9. end
  10.  
Runtime error #stdin #stdout #stderr 0.03s 8224KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
/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>'