works without any errors - but when i just deploy with cap staging deploy i get an error with composer.
Ive installed composer phar file in the /shared folder - is that right?
DEBUG [f4d8ab58] Command: cd /var/www/html/releases/20150423112136 && ( WP_ENV=staging /usr/bin/env composer install --no-dev --no-interaction --optimize-autoloader )
DEBUG [f4d8ab58] /usr/bin/env:
DEBUG [f4d8ab58] composer
DEBUG [f4d8ab58] : No such file or directory
DEBUG [f4d8ab58]
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as nodeuser@188.166.30.187: composer exit status: 127
composer stdout: Nothing written
composer stderr: /usr/bin/env: composer: No such file or directory
Ive set: set :composer_install_flags, '--no-dev --no-interaction --optimize-autoloader' but it doesnt seem to give me any extra composer debugging.
Just a note that cap staging deploy:check only checks permissions/folders. An extension like capistrano-composer canât hook into it to say âalso check if composer bin existsâ unfortunately.
@swalkinshaw I had just messed up creating composer global on the server. Works fine now.
But if you have time, can you tell me why you think i dont get any errors running cap staging wpcli:db:push while the db doesnt get updated? (it does say âmysqldump: command not foundâ in the beginning of the deploy but everything else seem to run fine)
Thanks, this worked for me. Could be useful to some to specify where to add these settings (if theyâre not that familiar with Ruby / capistrano, like me): add these lines to either deploy.rb, staging.rb or production.rb, depending on whether staging and production share the same host or paths.