File#flush doesn't flush in windows
In windows, File#flush flushes ruby's internal buffers, however, the result is different from Linux.
I'd recommend adding an arbitrary fsync if you're in windows to ensure the buffers are actually flushed, to avoid unexpected cross platform bugs [such as one that attachment_fu has].
This in 1.9/1.8.x
Updated by rogerdpack (Roger Pack) about 11 years ago
Wonder if it's related to recent zlib difficulties: