The upload() helper is definitely what you want. Basically, you just
give it the local file name and the remote file name, and it does the
upload via SFTP:
upload("/path/to/local.war", "/path/to/remote.war")
If you want to use SCP instead:
upload("local.war", "remote.war", :via => :scp)
You can also use it to upload entire directory trees (though it is
definitely faster to just archive the directory and upload the archive):
upload("/local/dir", "/remote/dir")
- Jamis
On Jun 23, 2008, at 3:18 PM, rachel wrote:
>
> On Jun 23, 2:09 pm, "David Masover" <[EMAIL PROTECTED]> wrote:
>> On Mon, Jun 23, 2008 at 3:55 PM, rachel <[EMAIL PROTECTED]> wrote:
>> The specific thing I'm trying to do is upload a file. I found put()
>>
>>> which seems to require a string parameter,
>>
>> How big is your file? You could always do a hack like:
>>
>> put File.read('/my/file'), '/some/where'
>
> It's the application WAR file. It's big, and also a binary.
>
>>
>> There's also this blog post, somewhat outdated:
>>
>> http://devblog.famundo.com/articles/2007/03/10/improving-
>> capistranos-...
>>
>> It looks like there is now an undocumented 'upload' method. That's
>> probably
>> better, if you can figure out how it works.
>
> I will poke around at these options, thanks for the info. upload()
> does sound like what I want, at least from the name!
>
> thx,
> Rachel
> >
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---