I need to upload a directory having sub-directories to a ftp server.
I can upload a file using
require 'net/ftp'
ftp = Net::FTP.new(options[:remote_host])
ftp.login(options[:username], options[:password])
ftp.put(File.open("filename"))
ftp.quit
It fails with uploading directory receiving error…
Errno::EISDIR: Is a directory
Can anyone give help?
Net::FTPimplements FTP protocol and FTP usesMKDcommand to create directories (different from commands used to create files).Net::FTPcan create directory with special Net::FTP#mkdir method.