Capistrano部署问题

Kam*_*nek 48 deployment capistrano ruby-on-rails

当我输入

cap production deploy

我明白了

Capfile locked at 3.1.0, but 3.2.0 is loaded

当我卸载时,capistrano 3.2.0我得到了

Could not find capistrano-3.2.0 in any of the sources
Run `bundle install` to install missing gems.
Run Code Online (Sandbox Code Playgroud)

我的gemfile有

gem 'capistrano', '~> 3.1'
gem 'capistrano-rails', '~> 1.1'
Run Code Online (Sandbox Code Playgroud)

和Capfile

require 'capistrano/setup'
require 'capistrano/deploy'
require 'capistrano/bundler'
require 'capistrano/rails/assets'
Run Code Online (Sandbox Code Playgroud)

在那种情况下该怎么办?

Kam*_*nek 102

它发生是config/deploy.rblock '3.1.0'.

它足以改变它'3.2.0',现在它正在发挥作用.

  • @squixy你可以使用像`lock'> = 3.2.0'这样的运算符 (17认同)

spy*_*yle 7

Bundler不应该为你处理这件事吗?如果您在Gemfile中指定了版本,则可以删除config/deploy.rb中的锁定版本.然后一个bundle exec cap production deploy应该做的伎俩.