Capistrano 3和Mercurial,无法加载此类文件 - capistrano / mercurial.rb

时间:2013-11-14 15:13:37

标签: mercurial capistrano capistrano3

尝试使用capistrano 3进行部署时出现此错误。

cap production deploy:setup
cap aborted!
cannot load such file -- capistrano/mercurial.rb

我的部署:

...
set :branch, "default"
set :deploy_to, "/var/rails"
set :deploy_via, :remote_cache
set :scm, 'mercurial'
...

我需要某种延期吗?到目前为止我唯一发现的是Capistrano-Mercurial-Ext,但没有帮助。

1 个答案:

答案 0 :(得分:3)

查看GitHub中的Capistrano 3源代码,Mercurial SCM任务称为'hg':

https://github.com/capistrano/capistrano/blob/master/lib/capistrano/tasks/hg.rake

所以尝试改变这一行:

set:scm,'mercurial'

成为:

set:scm,:hg