SFTP Error with Deprec on Windows
Anyone who’s using Deprec from Windows is likely to run into a problem where they get a strange SFTP StatusException error. The stack looks something like this:
c:/ruby/lib/ruby/gems/1.8/gems/net-sftp-1.1.0/lib/net/sftp/operations/abstract.rb:78:in`do_status':Net::SFTP::Operations::StatusException (4, "Failure") Net::SFTP::Operations::StatusException (4, "Failure"))
from c:/ruby/lib/ruby/gems/1.8/gems/net-sftp-1.1.0/lib/net/sftp/session.rb:221:in `do_status'The Bug
The bug is in a method called su_put that puts configuration files on the server using sudo. The temporary file name for this process is incorrectly generated if a /tmp directory does not exist on the client. This code should check for the /tmp directory on the server, not the client.
The Workaround
To workaround this, just create a directory called tmp in the root of the drive your project is on.
Trackbacks
Use the following link to trackback from your own site:
http://localhost:5000/trackbacks?article_id=sftp-error-with-deprec-on-windows&day=04&month=04&year=2007