【发布时间】:2020-12-10 18:58:32
【问题描述】:
我向我的Gemfile 添加了一个与resque gem 无关的新gem,但我遇到了bundle install 的问题。我不想运行捆绑更新,因为我不想在Gemfile.lock 中进行不必要的更改。在不进行太多更改的情况下克服此错误的最佳方法是什么?我想让我的 resque 版本与以前的版本保持一致。
Bundler could not find compatible versions for gem "resque":
In snapshot (Gemfile.lock):
resque (= 2.0.0)
In Gemfile:
resque (~> 2.0.0)
resque-status was resolved to 0.5.0, which depends on
resque (~> 1.19)
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
【问题讨论】:
-
bundle update {gem_name} --conservative只会更新你想要的 gem(s) bundler.io/man/bundle-update.1.html。 -
你添加了哪些与
resquegem 无关的 gem? -
感谢@dbugger!当我运行 bundle update resque-status --conservative 时对我来说效果很好
-
@spickermann 这只是一个带有代码 sn-p 的自定义 gem。
-
@spickermann 我打赌 OP 添加了
resque-status,因为这是依赖问题。 OP 我建议在别处寻找resque-status提供的功能,因为如果不进行太多更改,您将无法解决该依赖问题。此外,您将放弃一个积极开发的 gem 的完整主要版本以利用一个废弃的 gem。 (resque-status6 年未更新)
标签: ruby-on-rails ruby rubygems bundler