[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

FTP list fails on Mac OS 10.3

Koen Vervloesem

10/26/2004 10:03:00 PM

Hi,

The following example program of PickAxe 2 fails on Mac OS 10.3:

require 'net/ftp'
ftp = Net::FTP.new('ftp.netlab.co.jp')
ftp.login
ftp.list
ftp.close

/sw/lib/ruby/1.8/net/ftp.rb:276:in `initialize': Protocol not supported
- socket(2) (Errno::EPROTONOSUPPORT)
from /sw/lib/ruby/1.8/net/ftp.rb:276:in `open'
from /sw/lib/ruby/1.8/net/ftp.rb:276:in `makeport'
from /sw/lib/ruby/1.8/net/ftp.rb:310:in `transfercmd'
from /sw/lib/ruby/1.8/net/ftp.rb:402:in `retrlines'
from /sw/lib/ruby/1.8/net/ftp.rb:400:in `synchronize'
from /sw/lib/ruby/1.8/net/ftp.rb:415:in `retrlines'
from /sw/lib/ruby/1.8/net/ftp.rb:609:in `list'
from test.rb:4

Apparently the login works, but the list fails. This occurs also with
other ftp servers. What's happening here?

koan$ ruby -v
ruby 1.8.0 (2003-08-04) [powerpc-darwin]
koan$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.3.5
BuildVersion: 7M34

Koen
--
"Time is what keeps everything from happening at once."



1 Answer

Jan

10/26/2004 11:09:00 PM

0

Koen Vervloesem wrote:
> Hi,
>
> The following example program of PickAxe 2 fails on Mac OS 10.3:
>
> require 'net/ftp'
> ftp = Net::FTP.new('ftp.netlab.co.jp')
> ftp.login
> ftp.list
> ftp.close
>
> /sw/lib/ruby/1.8/net/ftp.rb:276:in `initialize': Protocol not supported
> - socket(2) (Errno::EPROTONOSUPPORT)
> from /sw/lib/ruby/1.8/net/ftp.rb:276:in `open'
> from /sw/lib/ruby/1.8/net/ftp.rb:276:in `makeport'
> from /sw/lib/ruby/1.8/net/ftp.rb:310:in `transfercmd'
> from /sw/lib/ruby/1.8/net/ftp.rb:402:in `retrlines'
> from /sw/lib/ruby/1.8/net/ftp.rb:400:in `synchronize'
> from /sw/lib/ruby/1.8/net/ftp.rb:415:in `retrlines'
> from /sw/lib/ruby/1.8/net/ftp.rb:609:in `list'
> from test.rb:4
>
> Apparently the login works, but the list fails. This occurs also with
> other ftp servers. What's happening here?
>
> koan$ ruby -v
> ruby 1.8.0 (2003-08-04) [powerpc-darwin]
> koan$ sw_vers
> ProductName: Mac OS X
> ProductVersion: 10.3.5
> BuildVersion: 7M34
>

I had the same problem, but an upgrade to 1.8.2-preview2 solved it. (If
you have darwinports, sudo port install ruby +preview)

Greets
Jan Sabbe