Forum: Ruby "closed stream" problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B58c6eef325656d513d26e2c3ae6bfd9?d=identicon&s=25 Peter Bailey (peterbailey)
on 2008-11-25 16:36
Hi,
Can someone please help me with this error? It gives an exception of a
"closed stream." What is that? I see that it's failing where it's
supposed to ftp over a file.

I'm being asked to send over .success and/or .error files for image
files I'm processing. I can see that the error file for this image has
been created. That's good. I see the file in the directory. But, it just
fails when it's supposed to ftp the file over. It had already succeeded
in ftp'ing over previous .success files, just not .error files like this
one.

Thanks,
Peter



================ IOError =====================
E:\live\ruby\lib\ruby\1.8/net/ftp.rb:206:in `write'
          @sock.write(line)
E:\live\ruby\lib\ruby\1.8/net/ftp.rb:206:in `putline'
          @sock.write(line)
E:\live\ruby\lib\ruby\1.8/net/ftp.rb:273:in `voidcmd'
      putline(cmd)
E:\live\ruby\lib\ruby\1.8/monitor.rb:242:in `synchronize'
          yield
E:\live\ruby\lib\ruby\1.8/net/ftp.rb:272:in `voidcmd'
          synchronize do
E:\live\ruby\lib\ruby\1.8/net/ftp.rb:448:in `storbinary'
      voidcmd("TYPE I")
E:\live\ruby\lib\ruby\1.8/monitor.rb:242:in `synchronize'
          yield
E:\live\ruby\lib\ruby\1.8/net/ftp.rb:447:in `storbinary'
          synchronize do
E:\live\ruby\lib\ruby\1.8/net/ftp.rb:559:in `putbinaryfile'
      storbinary("STOR " + remotefile, f, blocksize, rest_offset,
&block)
E:\live\scripts\RUBY\images\process_cfr2.rb:159
          ftp.putbinaryfile(fileerror)
E:\live\scripts\RUBY\images\process_cfr2.rb:35:in `each'
    Dir.glob("*.gif").each do |giffile|
E:\live\scripts\RUBY\images\process_cfr2.rb:35
    Dir.glob("*.gif").each do |giffile|

=============================================
Exception: closed stream
This topic is locked and can not be replied to.