Z
Z
ZurgInq2013-05-13 11:46:03
ruby
ZurgInq, 2013-05-13 11:46:03

Run capistrano script from php

You need to make a semblance of a web muzzle to launch the deployment. Capistrano is used for deployment. The problem is the following. In the php file, I run the cap deploy command as follows,
exec("cap deploy -S svnpass=$svnpass -S sshpass=$sshpass -S dbpass=$dbpass >& outdeploy.log");
I get the error “cap not found”
If you run it with the full path to cap
exec("~/.rvm/gems/ruby-1.9.2-p320/bin/cap deploy -S svnpass=$svnpass -S sshpass=$sshpass -S dbpass=$dbpass >& outdeploy.log");
, then the error “/usr/bin/env: ruby_noexec_wrapper: No such file or directory” falls

, and if you try to run the php script Through the command line, and not through the browser, everything works. Apache runs under the same user as ssh access.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
himik, 2013-05-13
@himik

php works for you on one user, and we will put rvm under another, guessed it?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question