Versions:

   - Ruby
   - Capistrano
   - Rake / Rails / etc

Platform:

   - Working on....
   - Deploying to...

Logs:

   - Please past logs (as completely as possible to a 3rd party pasting 
   service such as pastie.org)

Files:

   - Capfile
   - deploy.rb
   - Stage files (production.rb, staging.rb)


Versions:

   - Ruby 2.0.0 p451
   - Capistrano 3.1
   - Rake / Rails / etc Rails 4.0.3

Platform:

   - Working on.... Mac OS X
   - Deploying to... Mac OS X

Logs:

   - Please past logs (as completely as possible to a 3rd party pasting 
   service such as pastie.org)

Files:

   - Capfile
   - deploy.rb
   - Stage files (production.rb, staging.rb)

Hello,

I am having trouble figuring out how to capture the output from remote 
commands or better yet how to run commands remotely so I can right some 
conditions in my capistrano deploy.rb file. For instance, One of the things 
I would like to do is create a file on the remote system if the file 
doesn't exist.

What is the appropriate way to do this using capistrano? Am I able to just 
use the Net::SSH commands out of the box? Is there another set of commands 
I should be looking? Is there a list of commands somewhere?

What I came across in my searches are:

https://github.com/capistrano/capistrano
https://github.com/capistrano/sshkit

But didn't see any examples of how to capture this to use in my code if its 
possible.
Some things I have tried are:

execute "ls -al /some/directory"
run "ls -al /some/director
`ssh name@server 'ls -al /some/directory` #this works but I don't feel it 
is the right way

Sorry if this is such a basic question, I just can't seem to wrap my head 
around it.

-- 
You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/capistrano/3a35097c-cf4a-49de-9f5c-ad336861f8b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to