Capistrano on Windows - Send Binary File

So, I’m using TechnoWeenie’s recipe (
) for using Capistrano to deploy to a remote machine when the SVN
repository isn’t accessible over the Internet.

I keep running into a problem, though, with

put(“code_update.tar.gz”), “code_update.tar.gz”)

When Cap tries to untar the file, I get the following error message:

gzip: stdin: invalid compressed data–format violated

What I think is going on here is that on Windows, there is a distinction
between binary files and all others. So, isn’t taking this
into account, and the binary data is read incorrectly into the first
string arugment for put.

Does anyone know a way to reliably transfer a binary file from my
Windows machine using Capistrano? I am not wed to using put. I could try
using rsync or scp via a call to system, but I’d like to keep it as Ruby
as possible (in fact, I’d love to replace the calls to system used to
tar up the archive, if possible).