Forum: Ruby Error using net::ftp

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

problemreport-PVTQA01-200704190111.gz
/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 = Net::FTP.new('files')
  ftp.login(user = "xxx", password="xxx")
  ftp.chdir('processed')
  ftp.list() {|report|
    report =~ /(.*)(problemreport.*)/
    puts $2
    ftp.getbinaryfile($2,$2,1024)----> this is line 12

  }
  ftp.close

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.