Forum: Ruby Error using net::ftp

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
sagar (Guest)
on 2007-04-24 05:14
Has anyone seen something like this -

/usr/lib/ruby/1.8/net/ftp.rb:339:in `transfercmd': 200 PORT command
successful. Consider using PASV. (Net::FTPReplyError)
        from /usr/lib/ruby/1.8/net/ftp.rb:403:in `retrbinary'
        from /usr/lib/ruby/1.8/monitor.rb:238:in `synchronize'
        from /usr/lib/ruby/1.8/net/ftp.rb:401:in `retrbinary'
        from /usr/lib/ruby/1.8/net/ftp.rb:503:in `getbinaryfile'
        from bin/download_files.rb:12
        from /usr/lib/ruby/1.8/net/ftp.rb:432:in `retrlines'
        from /usr/lib/ruby/1.8/net/ftp.rb:424:in `loop'
        from /usr/lib/ruby/1.8/net/ftp.rb:424:in `retrlines'
        from /usr/lib/ruby/1.8/monitor.rb:238:in `synchronize'
        from /usr/lib/ruby/1.8/net/ftp.rb:421:in `retrlines'
        from /usr/lib/ruby/1.8/net/ftp.rb:627:in `list'
        from bin/download_files.rb:9

ftp ='files')
  ftp.login(user = "xxx", password="xxx")
  ftp.list() {|report|
    report =~ /(.*)(problemreport.*)/
    puts $2
    ftp.getbinaryfile($2,$2,1024)----> this is line 12


If I go into ftp.rb and simply comment out line 339 above everything
works fine.
This topic is locked and can not be replied to.