I am trying to deploy my Symfony2 project to server with capifony but i got this error:
* 2013-06-25 16:22:19 executing `symfony:assets:install'
--> Installing bundle's assets
* executing "sh -c 'cd /home/user1/releases/20130625142202 && php app/console assets:install web --env=prod --no-debug'"
servers: ["1xx"]
[1xx] executing command
** [out :: 1xx]
** [out :: 1xx] Warning: require(/home/user1/releases/20130625142202/app/../vendor/autoload.php): failed to open stream: No such file or directory in /home/user1/releases/20130625142202/app/autoload.php on line 14
** [out :: 1xx]
** [out :: 1xx] Fatal error: require(): Failed opening required '/home/user1/releases/20130625142202/app/../vendor/autoload.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/user1/releases/20130625142202/app/autoload.php on line 14
command finished in 369ms
*** [deploy:update_code] rolling back
here is my output:
- 2013-06-25 16:51:49 executing
symfony:composer:get' <ul> <li>executing "if [ -e /home/user/releases/20130625145137/composer.phar ]; then echo 'true'; fi" servers: ["xx.xxx.xx.xx"] [xx.xxx.xx.xx] executing command command finished in 488ms --> Updating Composer</li> <li>executing "sh -c 'cd /home/user/releases/20130625145137 && php composer.phar self-update'" servers: ["xx.xxx.xx.xx"] [xx.xxx.xx.xx] executing command command finished in 377ms --> Updating Composer dependencies</li> <li>executing "sh -c 'cd /home/user/releases/20130625145137 && php composer.phar update --no-scripts --no-dev --verbose --prefer-dist --optimize-autoloader --no-progress'" servers: ["xx.xxx.xx.xx"] [xx.xxx.xx.xx] executing command command finished in 390ms</li> <li>2013-06-25 16:51:50 executing
symfony:bootstrap:build' --> Building bootstrap file - executing "if [ -e /home/user/releases/20130625145137/bin/build_bootstrap ]; then echo 'true'; fi" servers: ["xx.xxx.xx.xx"] [xx.xxx.xx.xx] executing command command finished in 336ms
- executing "sh -c 'cd /home/user/releases/20130625145137 && test -f vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php && php vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php app || echo 'vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php not found, skipped''" servers: ["xx.xxx.xx.xx"] [xx.xxx.xx.xx] executing command ** [out :: xx.xxx.xx.xx] vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php command finished in 392ms
- 2013-06-25 16:51:51 executing
symfony:composer:dump_autoload' --> Dumping an optimized autoloader</li> <li>executing "sh -c 'cd /home/user/releases/20130625145137 && php composer.phar dump-autoload --optimize'" servers: ["xx.xxx.xx.xx"] [xx.xxx.xx.xx] executing command command finished in 417ms</li> <li>2013-06-25 16:51:52 executing
symfony:assets:install' --> Installing bundle's assets - executing "sh -c 'cd /home/user/releases/20130625145137 && php app/console assets:install web --env=prod --no-debug'" servers: ["xx.xxx.xx.xx"] [xx.xxx.xx.xx] executing command ** [out :: xx.xxx.xx.xx] ** [out :: xx.xxx.xx.xx] Warning: require(/home/user/releases/20130625145137/app/../vendor/autoload.php): failed to open stream: No such file or directory in /home/user/releases/20130625145137/app/autoload.php on line 14 ** [out :: xx.xxx.xx.xx] ** [out :: xx.xxx.xx.xx] Fatal error: require(): Failed opening required '/home/user/releases/20130625145137/app/../vendor/autoload.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/user/releases/20130625145137/app/autoload.php on line 14 command finished in 417ms * [deploy:update_code] rolling back
- executing "rm -rf /home/user/releases/20130625145137; true" servers: ["xx.xxx.xx.xx"] [xx.xxx.xx.xx] executing command
vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php not found, skipped'
– Nicolai Fröhlich--no-scripts
when composer is being executed it will already build the bootstrap, dump the assets ... namely what you configure in your composer.json under scripts ... and the optimized autoloader is being dumped there aswell ... no need to executecomposer.phar dump-autoload --optimize
a second time afterwards – Nicolai Fröhlich--no-scripts
in the whole capifony repository only returns one hit in the CHANGELOG.md ... Where does that come from during your deployment process? Well it makes sense if you execute the commands through capifony afterwards ... but i think it will most likely be easier to let composer handle the bootstrap-building and stuff – Nicolai Fröhlich