require
'net/ftp'
begin
ftp
=
Net::FTP::open
(
"host"
,
"username"
,
"password"
)
ftp
.
puttextfile
(
"local_path_to_file"
,
"remote_path_to_file"
)
ftp
.
close
rescue
puts
$!
end