【问题标题】:resque-status is not compatible with my current resque versionresque-status 与我当前的 resque 版本不兼容
【发布时间】: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
  • 你添加了哪些与resque gem 无关的 gem?
  • 感谢@dbugger!当我运行 bundle update resque-status --conservative 时对我来说效果很好
  • @spickermann 这只是一个带有代码 sn-p 的自定义 gem。
  • @spickermann 我打赌 OP 添加了resque-status,因为这是依赖问题。 OP 我建议在别处寻找resque-status 提供的功能,因为如果不进行太多更改,您将无法解决该依赖问题。此外,您将放弃一个积极开发的 gem 的完整主要版本以利用一个废弃的 gem。 (resque-status 6 年未更新)

标签: ruby-on-rails ruby rubygems bundler


【解决方案1】:

resque-status 的问题:它的最后一次提交(迄今为止,对于 0.5.0 版本)是在 5 years ago 完成的,所以是一个相当过时且无人维护的 gem。
只要这没有更新,您就应该尝试一些分叉的运气。 This looks promising,因为它更新了版本限制in the gemspec,所以尝试添加到您的Gemfile

gem 'resque-status', git: 'https://github.com/fishisfast/resque-status.git', branch: :master

另一个解决方案是尝试使用另一个 gem,比如 resque-web,它看起来“有点”维护得更好,但我不承诺任何事情。

【讨论】:

    猜你喜欢
    • 2012-11-07
    • 2011-01-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-11-29
    • 2021-10-11
    • 1970-01-01
    相关资源
    最近更新 更多