tcp socket error

T

Tom Reilly

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top