Question

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
Était-ce utile?

La solution

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top