Domanda

I'm trying to make a proof of concept script with ruby, but seem to be failing... I've give then script permission to run, but when it's ran I get ": No such file or directory" from my terminal.

I do have net-sftp installed through gem, so I'm at a loss as to what it could be.

#!/usr/bin/env ruby

require 'net/sftp'

Net::SFTP.start('10.0.0.8', 'jacob', :password=> 'password') do |sftp|
  #download a directory
  sftp.download!("/home/jacob/backups/*", "/home/pi")
end
È stato utile?

Soluzione

Turns out it was an issue with my system, not ruby. Sorry for the confusion.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top