title: How to upload ftp directory using ruby
body: <p>I need to upload a directory having sub-directories to a ftp server.</p>
  
  <p>I can upload a file using</p>
  
  <pre><code>require 'net/ftp'
  ftp = Net::FTP.new(options[:remote_host])
  ftp.login(options[:username], options[:password])
  
  ftp.put(File.open("filename"))
  
  ftp.quit
  </code></pre>
  
  <p>It fails with uploading directory receiving error...</p>
  
  <pre><code>Errno::EISDIR: Is a directory
  </code></pre>
  
  <p>Can anyone give help?</p>