Ruby and FTP

I came across a great tip that should help anyone trying to make an FTP client in Ruby. Basically it seems the Net/FTP library is attempting reverse lookups of addresses you try to connect to (which is in itself fine, but perhaps unnecessary). The problem arises because the reverse lookup is called each time a new file transfer is initiated. http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/112801

Here’s the resolution I found in the japanese forum:

BasicSocket.do_not_reverse_lookup = true

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>