Nevermind. I found out that destination filename must be specified.

sftp.upload!('testSFTP.rb', '/home/rems/testSFTP.rb')


by
TheR


When nothing helps, read the documentation.
-- 
Posted via http://www.ruby-forum.com/.