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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Hey Stefan, could you provide a transcript of the error message that you''re receiving? -Conrad On 3/5/07, stemey <s.meyer-f4nibZ0D32L2O37bPCeAEBvVK+yQ3ZXh@public.gmane.org> wrote:> > 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 > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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
On 3/5/07, stemey
<s.meyer-f4nibZ0D32L2O37bPCeAEBvVK+yQ3ZXh@public.gmane.org>
wrote:>
>
> 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
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---