无法激活capistrano-rails-1.2.3,与capistrano冲突

时间:2017-04-30 14:59:01

标签: ruby-on-rails capistrano

我在下一篇关于部署Ruby On Rails的教程中遇到了以下问题 Ubuntu 16.04:https://gorails.com/deploy/ubuntu/16.04

这个问题似乎与capistrano有关。

<tr ng-repeat="team in event.teams">

我的gemfile有:

nicoara@ubuntu:~/deploy_test$ cap install STAGES=production
/home/nicoara/.rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/specification.rb:2112:in `raise_if_conflicts': Unable to activate capistrano-rails-1.2.3, because capistrano-2.15.9 conflicts with capistrano (~> 3.1) (Gem::ConflictError)
           from /home/nicoara/.rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/specification.rb:1280:in `activate'
           from /home/nicoara/.rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems.rb:198:in `rescue in try_activate'
           from /home/nicoara/.rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems.rb:195:in `try_activate'

...

我的capfile有:

   group :development do
   gem 'capistrano', '~> 3.7', '>= 3.7.1'
   gem 'capistrano-rails', '~> 1.2'
   gem 'capistrano-passenger', '~> 0.2.0'
   gem 'capistrano-rbenv', '~> 2.1'

该怎么办?

由于

1 个答案:

答案 0 :(得分:1)

错误消息说:

  

因为 capistrano-2.15.9 冲突

显然Capistrano 2.15.9正在执行,即使你的Gemfile所描述的意图是使用capistrano 3.7。

使用bundle exec cap确保您运行Gemfile中指定的Capistrano版本。