From: Roger Pack Date: 2008-11-15T12:49:59+09:00 Subject: [ruby-core:19940] Re: file's not flushing then sizing in win32 >> Some people have run into the bug in win32 where writing to a temp >> file, flushing it, then subsequently calling file.size doesn't work >> [returns zero in error]. > > How I reproduce the problem? This is an example: require 'tempfile' a = Tempfile.new 'abc' a.write '123' raise unless a.size == 3 raise unless File.size(a.path) == 3 # raises in windows, not in Linux--both 1.8.x and 1.9 root of the problem seems to be the "flush" call. A patch for tempfile working around this is given at the top of [1]. Apparently attachment_fu assumed it would work and it doesn't. Thanks! -=R [1] http://epirsch.blogspot.com/2008/01/fixing-attachmentfu-on-windows-like.html