Rails 5 个使用 Adhoq gem。无法解析捆绑程序依赖项

Rails 5 with Adhoq gem. Unable to resolve bundler dependencies

好的,所以我正在尝试将 Adhoq gem 安装到我的 Rails 5 项目中。

当我像往常一样添加它时 (gem 'adhoq') 它失败了,因为默认依赖项是 rails 4 和一些其他过时的库,我有更新的版本。

我可以看到 gemfiles/Gemfile-rails-5.0x 存在,但我以前从未见过这种设计模式。

我知道我可以分叉它并手动更新依赖项,但这会带来一大堆其他问题,并且由于此 gem 文件存在,它会导致我遇到一些我目前不了解 Bundler 或 gem作为一个整体。

浏览 Bundler 文档没有帮助,但我会继续挖掘。

我缺少什么?

这样做:

  1. gem 'adhoq', '0.1.2' 添加到 Gemfile 中。 (0.1.2 是最新的)
  2. bundle install 之前检查其他 gem 与 adhoq 的依赖关系。要检查 运行时依赖项 请参考此网站。 https://rubygems.org/gems/adhoq.
  3. 执行bundle install。如果满足 adhoq gem.
  4. 的所有运行时依赖项,您将不会收到任何错误
  5. Still If you are not able to execute bundle install than Remove Gemfile.lock。并再次执行 bundle install。希望这会奏效。

注意:要避免第 4 步,您可以逐一更新特定的 gem 以满足运行时依赖性。

干杯