Re: [capistrano-mailing-list] capturing output from remote servers?

10 views
Skip to first unread message

Lee Hambley

unread,
Apr 1, 2014, 4:35:59 PM4/1/14
to capistrano

https://github.com/capistrano/sshkit/blob/master/EXAMPLES.md

Sent from my Nexus 4.

On 1 Apr 2014 21:57, "Vell" <lovell....@gmail.com> wrote:
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 run commands on a remote system in order to 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? 

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 capistrano+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/e3ad8626-5cb4-4439-ad87-1c5b3b407a4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages