2017-03-04 99 views
0

我嘗試設置capristrano部署 - 但有錯誤,Capistrano的安裝在Ubuntu 14.04衝突

環境中的Ubuntu 14.04

紅寶石: 紅寶石-v 紅寶石2.2.6p396(二○一六年十一月十五日修訂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 



[email protected]:/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) 

我如何解決這個錯誤?

回答

2

錯誤消息解釋該問題:

capistrano-3.7.2 conflicts with capistrano (<= 2.16.0, >= 2.13.5) 

換句話說,capifony顯然需要Capistrano的< = 2.16.0,> = 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