Tcp socket error


#1

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:ingetline’
from c:/ruby/lib/ruby/1.8/net/ftp.rb:221:in getmultiline' from c:/ruby/lib/ruby/1.8/net/ftp.rb:235:ingetresp’
from c:/ruby/lib/ruby/1.8/net/ftp.rb:251:in voidresp' from c:/ruby/lib/ruby/1.8/net/ftp.rb:274:invoidcmd’
from c:/ruby/lib/ruby/1.8/monitor.rb:238:in synchronize' from c:/ruby/lib/ruby/1.8/net/ftp.rb:272:invoidcmd’
from c:/ruby/lib/ruby/1.8/net/ftp.rb:290:in sendport' from c:/ruby/lib/ruby/1.8/net/ftp.rb:298:inmakeport’
from c:/ruby/lib/ruby/1.8/net/ftp.rb:329:in transfercmd' from c:/ruby/lib/ruby/1.8/net/ftp.rb:421:inretrlines’
from c:/ruby/lib/ruby/1.8/monitor.rb:238:in synchronize' from c:/ruby/lib/ruby/1.8/net/ftp.rb:419:inretrlines’
from c:/ruby/lib/ruby/1.8/net/ftp.rb:628:in `list’
from ftp_learn.rb:11
Exit code: 1