4

我真的把头撞到了墙上,我自己找不到解决这个问题的方法。

我正在使用 Spree 商业分支 Solidus 开始一个项目。我用 gem 玩了一会儿,现在我已经准备好认真并开始开发了,我创建了一个新项目广告,但遇到了这个令人讨厌的错误:

Bundler could not find compatible versions for gem "rails":
  In snapshot (Gemfile.lock):
    rails (= 5.1.2)

  In Gemfile:
    rails (~> 5.1.2)

    solidus was resolved to 1.0.0, which depends on
      solidus_core (= 1.0.0) was resolved to 1.0.0, which depends on
        rails (~> 4.2.0)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

bundle update没有解决我的问题......我的解决方案已经用完了,并且会感谢一些帮助解决这个问题的人。

谢谢

4

1 回答 1

5

Bundler 通过向您展示您对 rails gem 的版本要求不兼容来帮您一个忙。

您已rails (~> 5.1.2)在 gemfile 中列出并且solidus gem 依赖于rails (~> 4.2.0),因此对于您的应用程序应该使用哪个版本的rails 存在冲突。

您使用solidus 1.0.0 版有什么原因吗?目前solidus的最新版本似乎是2.0.2。更高版本的solidus 将为rails 列出更新的依赖项,这将允许您的应用程序使用rails 5+。

将 gemfile 中的solidus 版本更新为更新的版本,看看是否允许捆绑器成功安装。

于 2017-06-27T17:51:43.063 回答