2011-12-08 19 views
3

我試圖(第一次)使用capifony從我的github回購部署我的網站。它運行到設置階段,並有這個錯誤:帽部署symfony2項目的問題,找不到應用程序/ bootstrap.php.cache

** [out :: example.me] PHP Warning: require_once(/var/www/example/prod/releases/20111208212344/app/bootstrap.php.cache): failed to open stream: No such file or directory in /var/www/example/prod/releases/20111208212344/app/console on line 4 
** [out :: example.me] PHP Fatal error: require_once(): Failed opening required '/var/www/example/prod/releases/20111208212344/app/bootstrap.php.cache' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/example/prod/releases/20111208212344/app/console on line 4 
** [out :: example.me] PHP Warning: require_once(/var/www/example/prod/releases/20111208212344/app/bootstrap.php.cache): failed to open stream: No such file or directory in /var/www/example/prod/releases/20111208212344/app/console on line 4 
** [out :: example.me] PHP Fatal error: require_once(): Failed opening required '/var/www/example/prod/releases/20111208212344/app/bootstrap.php.cache' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/example/prod/releases/20111208212344/app/console on line 4 
    command finished in 106300ms 
    * executing `symfony:assets:install' 
    * executing "cd /var/www/example/prod/releases/20111208212344 && php app/console assets:install web --env=prod" 
    servers: ["example.me"] 
    [example.me] executing command 
** [out :: example.me] PHP Warning: require_once(/var/www/example/prod/releases/20111208212344/app/bootstrap.php.cache): failed to open stream: No such file or directory in /var/www/example/prod/releases/20111208212344/app/console on line 4 
** [out :: example.me] PHP Fatal error: require_once(): Failed opening required '/var/www/example/prod/releases/20111208212344/app/bootstrap.php.cache' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/example/prod/releases/20111208212344/app/console on line 4 
    command finished in 1294ms 
*** [deploy:update_code] rolling back 
    * executing "rm -rf /var/www/example/prod/releases/20111208212344; true" 
    servers: ["example.me"] 
    [example.me] executing command 
    command finished in 1329ms 
failed: "sh -c 'cd /var/www/example/prod/releases/20111208212344 && php app/console assets:install web --env=prod'" on example.me 

有沒有人遇到過這個問題?任何想法可能是什麼原因?

+0

供應商是否安裝? –

+0

可能是這樣,我應該在部署之前將它們安裝到共享目錄中嗎?我不知道如果沒有服務器上的symphony版本,我將如何做到這一點,我通過控制檯/ deps文件安裝它們。 – ed209

+1

您需要運行'bin/vendors install'腳本來安裝代理。將'set:update_vendors,true'添加到'deploy.rb'來指示capifony執行它。詳情請見[capifony網站](http://capifony.org)。 –

回答

0

我被困在這一段時間,我不確定它是否完全相同的問題。當我部署vi Capifony時,bootstrap.php.cache文件指向我的FormBundle.php文件,但在之前的版本文件夾中不再存在。我查看了vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php中的代碼,它使用的路徑是實際路徑(DIR。'/ ../.. /。 ./../../../../../app') - 硬編碼路徑,wtf?問題在於我的供應商文件夾在共享文件夾的mySymfony設置之外,所以實際路徑指向沒有用處。

然而,它確實在代碼中檢查了一個服務器變量($ _SERVER('argv')),所以我只是在虛擬主機中將其添加到文件中: SetEnv argv/var/www/njc-forms/current

希望能幫助那裏的人。