Displaying 1 result from an estimated 1 matches for "putbinaryfile".
2006 May 03
0
Strange problems with net/ftp in Rails
...creates a file
on the destination server, but it''s a zero byte file.
I make a connection and login:
@connection = Net::FTP.new @website.site_ftp
@connection.login( @website.username, @website.password )
I then change to the right folder and send the file:
chdir remote_path
@connection.putbinaryfile local, remote_file
And the error is raised on that last line - just a TransferError from
the net/ftp library, and a zero-byte file after hanging for about 30
seconds.
Can anyone offer any suggestion at all? Bear in mind this has worked
fine with a great number of hosts, even this problematic host...