Forum: Ruby tcp socket error

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.
Tom R. (Guest)
on 2007-04-17 04:53
(Received via mailing list)
I've had no problem with this program with windows 2000 and xp.  However
I bought a computer and vista comes with it.

With Ruby 1.8.6-i386-mswin I get the following error:

require 'net/ftp'

ftp ='')

p ftp.status

p "dir changed"
p "------------"
files = ftp.list
files.each {|x| p x}


 >ruby ftp_learn.rb
"211- FTP server status:\n     Version 5.339PWS/AI\n     Connected to\n     Logged in as nwlagard\n     TYPE: ASCII, FORM:
Nonprint; STRUcture: File; transfer MODE: Stream\n     No data
connection\n211 End of status\n"
"dir changed"
c:/ruby/lib/ruby/1.8/net/ftp.rb:211:in `readline': Invalid argument
    from c:/ruby/lib/ruby/1.8/net/ftp.rb:211:in `getline'
    from c:/ruby/lib/ruby/1.8/net/ftp.rb:221:in `getmultiline'
    from c:/ruby/lib/ruby/1.8/net/ftp.rb:235:in `getresp'
    from c:/ruby/lib/ruby/1.8/net/ftp.rb:251:in `voidresp'
    from c:/ruby/lib/ruby/1.8/net/ftp.rb:274:in `voidcmd'
    from c:/ruby/lib/ruby/1.8/monitor.rb:238:in `synchronize'
    from c:/ruby/lib/ruby/1.8/net/ftp.rb:272:in `voidcmd'
    from c:/ruby/lib/ruby/1.8/net/ftp.rb:290:in `sendport'
    from c:/ruby/lib/ruby/1.8/net/ftp.rb:298:in `makeport'
    from c:/ruby/lib/ruby/1.8/net/ftp.rb:329:in `transfercmd'
    from c:/ruby/lib/ruby/1.8/net/ftp.rb:421:in `retrlines'
    from c:/ruby/lib/ruby/1.8/monitor.rb:238:in `synchronize'
    from c:/ruby/lib/ruby/1.8/net/ftp.rb:419:in `retrlines'
    from c:/ruby/lib/ruby/1.8/net/ftp.rb:628:in `list'
    from ftp_learn.rb:11
 >Exit code: 1
This topic is locked and can not be replied to.