Capistrano put

Hi,

I have tried to use “put” in my capistrano task to upload a zip file.
Unfortunately it gets corrupted. This is the code:

put(File.read(“releases/current/source.zip”),
“/home//releases/current/source.zip”,
:mode => 0444)

Do I have to set a parameter saying that it is a binary file? The
local server is a windows box and the remote ones are linux/debian.

Thanks,
Stefan

Hey Stefan, could you provide a transcript of the error message that
you’re receiving?

-Conrad

Quick fix… Delete the destination file first.

delete "/home//releases/current/source.zip"put(File.read
(“releases/current/source.zip”),
“/home//releases/current/source.zip”,
:mode => 0444)

That fixed it for me.

Regards, Lori

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs