From: "Peter (Guo) Pei" Date: 2010-10-05T08:58:42+09:00 Subject: net:sftp 2.0.5 upload! does not work I tried to upload files from a windows box to a linux box, and I used net:sftp 2.0.5. However I got the following error message: C:/ruby/lib/ruby/gems/1.8/gems/net-sftp-2.0.5/lib/net/sftp/operations/upload.rb:168:in `initialize': expected a file to upload (ArgumentError) from C:/ruby/lib/ruby/gems/1.8/gems/net-sftp-2.0.5/lib/net/sftp/session.rb:98:in `new' from C:/ruby/lib/ruby/gems/1.8/gems/net-sftp-2.0.5/lib/net/sftp/session.rb:98:in `upload' from C:/ruby/lib/ruby/gems/1.8/gems/net-sftp-2.0.5/lib/net/sftp/session.rb:103:in `upload!' Here are the related lines of code: [code] sftp = Net::SFTP.start('somehost', 'someuserid', :password => 'somepassword') sftp.upload!("c:\\dba\\1.0.29_QA\\" + windows_path, "./dba/" + line) [/code] I know the file exists, and I tried different ways of specifying the path, with slash and backslash, with full path and particial path... but none of those worked. I suspect net:sftp 2.0.5 is broken... -- Posted via http://www.ruby-forum.com/.