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:inreadline': 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:ingetmultiline' from c:/ruby/lib/ruby/1.8/net/ftp.rb:235:in
getresp’
from c:/ruby/lib/ruby/1.8/net/ftp.rb:251:invoidresp' from c:/ruby/lib/ruby/1.8/net/ftp.rb:274:in
voidcmd’
from c:/ruby/lib/ruby/1.8/monitor.rb:238:insynchronize' from c:/ruby/lib/ruby/1.8/net/ftp.rb:272:in
voidcmd’
from c:/ruby/lib/ruby/1.8/net/ftp.rb:290:insendport' from c:/ruby/lib/ruby/1.8/net/ftp.rb:298:in
makeport’
from c:/ruby/lib/ruby/1.8/net/ftp.rb:329:intransfercmd' from c:/ruby/lib/ruby/1.8/net/ftp.rb:421:in
retrlines’
from c:/ruby/lib/ruby/1.8/monitor.rb:238:insynchronize' 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