Forum: Ruby tcp socket error

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.
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 = Net::FTP.new('ftp.nwlagardener.org')
ftp.login("nwlagard","*******")

p ftp.status

ftp.chdir('web')
p "dir changed"
p "------------"
files = ftp.list
files.each {|x| p x}
ftp.gettextfile('cis.html','cis.html')

ftp.close


___________________________________________________________________________________________________________
 >ruby ftp_learn.rb
"211- FTP server status:\n     Version 5.339PWS/AI\n     Connected to
70.153.178.54\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
(Errno::EINVAL)
    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.