我尝试设置capristrano部署 - 但有错误,
环境是Ubuntu 14.04
红宝石: 红宝石-v ruby 2.2.6p396(2016-11-15修订版56800)[x86_64-linux-gnu]gem install capistrano
Successfully installed capistrano-3.7.2
Parsing documentation for capistrano-3.7.2
Done installing documentation for capistrano after 1 seconds
1 gem installed
root@grek-Inspiron-11-3147:/tmp# gem install capifony
Successfully installed capifony-2.8.6
Parsing documentation for capifony-2.8.6
Done installing documentation for capifony after 1 seconds
1 gem installed
capifony .
[skip] './Capfile' already exists
[skip] './app/config/deploy.rb' already exists
[done] symfony 2 project capifonied!
我设置了参数。
然后
cap deploy:setup
(Backtrace restricted to imported tasks)
cap aborted!
Gem::ConflictError: Unable to activate capifony-2.8.6, because capistrano-3.7.2 conflicts with capistrano (<= 2.16.0, >= 2.13.5)
/home/grek/PhpstormProjects/osiedle/Capfile:3:in `<top (required)>'
Gem::ConflictError: Unable to activate capifony-2.8.6, because capistrano-3.7.2 conflicts with capistrano (<= 2.16.0, >= 2.13.5)
/home/grek/PhpstormProjects/osiedle/Capfile:3:in `<top (required)>'
LoadError: cannot load such file -- capifony_symfony2
/home/grek/PhpstormProjects/osiedle/Capfile:3:in `<top (required)>'
(See full trace by running task with --trace)
我如何解决这个错误?
答案 0 :(得分:2)
错误消息解释了问题:
capistrano-3.7.2 conflicts with capistrano (<= 2.16.0, >= 2.13.5)
换句话说,capifony显然需要capistrano&lt; = 2.16.0,&gt; = 2.13.5,但你已经安装了capistrano 3.7.2。
解决方案是卸载capistrano并重新安装兼容版本。
gem uninstall capistrano
gem install capistrano -v "<= 2.16.0, >= 2.13.5"
您应该看到:
Fetching: capistrano-2.15.9.gem (100%)
Successfully installed capistrano-2.15.9
1 gem installed