资产步骤中的cap部署失败

时间:2013-03-07 13:21:25

标签: symfony deployment capifony

我尝试使用capifony在我的ubuntu服务器上部署我的Symfony 2应用程序,但是当我使用cap deploy

时它失败了

我收到以下错误:

--> Installing bundle's assets..............................✘
*** [err :: mysite.com] PHP Warning:  require_once(/home/mysite.com/www/releases/20130307125604/app/bootstrap.php.cache): failed to open stream: No such file or directory in /home/mysite.com/www/releases/20130307125604/app/console on line 10
*** [err :: mysite.com] PHP Fatal error:  require_once(): Failed opening required '/home/mysite.com/www/releases/20130307125604/app/bootstrap.php.cache' (include_path='.:/usr/share/php:/usr/share/pear') in /home/mysite.com/www/releases/20130307125604/app/console on line 10
*** [deploy:update_code] rolling back
failed: "sh -c 'sh -c '\\''cd /home/mysite.com/www/releases/20130307125604 && php app/console assets:install web --env=prod'\\'''" on mysite.com

这是我的deploy.rb

set :application, "mysite"
set :domain,      "#{application}.com"
set :deploy_to,   "/home/#{domain}/www"

ssh_options[:user] = 'root'
set :repository,  "git@github.com:Me/mysite.git"
set :scm,         :git
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `subversion`, `mercurial`, `perforce`, or `none`

set :model_manager, "doctrine"
# Or: `propel`

role :web,        domain                         # Your HTTP server, Apache/etc
role :app,        domain                         # This may be the same as your `Web` server
role :db,         domain, :primary => true       # This is where Symfony2 migrations will run

set  :use_sudo,      false
set  :keep_releases,  3

如何解决?

1 个答案:

答案 0 :(得分:0)

好像你错过了这一行:

set :use_composer, true