Capifony rollback不起作用

时间:2014-04-17 10:46:26

标签: symfony ssh capistrano capifony

我的Capifony设置有效......我可以部署多个版本......

C:\xampp\htdocs\example>cap deploy
--> Updating code base with remote_cache strategy
--> Creating cache directory................................
--> Creating symlinks for shared directories................
--> Creating symlinks for shared files......................
--> Normalizing asset timestamps............................
--> Downloading Composer....................................
--> Installing Composer dependencies........................
--> Dumping all assets to the filesystem....................
--> Warming up cache........................................
--> Clear controllers.......................................
--> Successfully deployed!

问题在于cap deploy:rollback功能。

我收到了这个错误:

C:\xampp\htdocs\example>cap deploy:rollback
failed: "sh -c 'cd /srv/www/example && false dump-autoload --optimize'" on 192.168.178.102

多出Capfile

load 'deploy' if respond_to?(:namespace) # cap2 differentiator

require 'capifony_symfony2'
load 'app/config/deploy'

多出deploy.rb

set   :application,   "ExampleProject"
set   :deploy_to,     "/srv/www/example"
set   :domain,        "example.org"

set   :scm,           :git
set   :repository,    "git@gitlab.example.org:www/project.git"

server "192.168.178.102", :app, :web, :db, :primary => true

set   :use_sudo,      false
set   :keep_releases, 3
set   :deploy_via,    :remote_cache

# Symfony2
set :shared_files,        ["app/config/parameters.yml"]
set :shared_children,     [app_path + "/logs", web_path + "/uploads", "vendor"]
set :use_composer, true
set :dump_assetic_assets, true

# SSH
set :user, "www-data"
set :git_enable_submodules, 1

3 个答案:

答案 0 :(得分:1)

  1. 手动验证是否已安装composer或install it。在deploy.rb set :composer_bin, "/usr/bin/composer"
  2. 中提供相应路径
  3. 通过添加logger.level = Logger::DEBUG来启用更详细的输出以获取更多详细信息。

答案 1 :(得分:0)

我遇到了同样的问题。在调查了一下后,我发现作曲家的路径是出于某种原因而设置的。我在我的deploy.rb中添加了作曲家的路径并且它有效。因此,请将以下内容添加到deploy.rb

set :composer_bin, "/usr/bin/composer"

答案 2 :(得分:-1)

使用capifony 2.5以后回滚任务不起作用/转储错误,问题打开:https://github.com/everzet/capifony/issues/511