From: William Stevens Date: 2006-05-04T23:19:45+09:00 Subject: Re: New thread for RUBY ftp problems . . . Peter Bailey wrote: > I'm starting a new thread, because, my problem appears even in the > simplest try of RUBY's ftp. > > Here's a simple attempt to just ftp a file over to one of our UNIX > servers here at my company. It's left hanging after the last "end" and I > have to kill the shell. > > > C:\workflows\graphics\OneVision\MPC\indexes\6x9>irb > irb(main):001:0> require 'net/ftp' > => true > irb(main):002:0> ftp = Net::FTP.open('quark.bna.com') do |ftp| > irb(main):003:1* ftp.login('user','passw') > irb(main):004:1> ftp.chdir('/home/pb4072') > irb(main):005:1> ftp.putbinaryfile("lrr095.pdf") > irb(main):006:1> end > > Is RUBY's ftp reliable? Or, what am I doing wrong?? > > Thanks. Peter, I tried this sequence on my system and it worked: thor:~ wfs$ irb irb(main):001:0> require 'net/ftp' => true irb(main):002:0> ftp = Net::FTP.open('thor') do |ftp| irb(main):003:1* ftp.login('user','password') irb(main):004:1> ftp.putbinaryfile('sorted.txt','sortedXmit.txt') irb(main):005:1> end the file I used is quite small so the code completed quickly. and I verified that the file was transmited. I am on Mac OS X 10.4.6 with ruby 1.8.4 Bill -- Posted via http://www.ruby-forum.com/.