On Fri, 11 Aug 2006 rubyhacker / gmail.com wrote: > Here's my (simple) code. This has worked fine in the past; > now even this simple example fails for me. > > It gets as far as creating an empty file, then it hangs and > times out. > > This is Ruby 1.8.4 on FC4, talking to another Linux box > (RH Enterprise I think). > > Any ideas? > > Hal > > > domain, user, password = "mydomain.com", "myuser", "mypass" > args = [domain] > args << user << password if user != nil > puts "Connecting..." > @ftp = Net::FTP.new(*args) > @rempath = "/var/www/html/whatever/" > puts "Change dir..." > @ftp.chdir(@rempath) > > puts "Upload file..." > @ftp.puttextfile("foobar","foobar-rem") # Hangs here! > puts "Closing..." > @ftp.close > puts "Finished." @ftp.passive = true ?? -a -- to foster inner awareness, introspection, and reasoning is more efficient than meditation and prayer. - h.h. the 14th dali lama