【问题标题】:Bundler could not find compatible versions for gem "rails"Bundler 找不到 gem "rails" 的兼容版本
【发布时间】:2015-05-18 21:00:02
【问题描述】:

我正在尝试通过 here 找到的 Masq OpenId Server 安装说明。

但是,当我进入安装步骤的第 2 步时,运行 bundle install

时出现以下错误
Resolving dependencies...
Bundler could not find compatible versions for gem "rails":
  In Gemfile:
    masq (>=0) ruby depends on
      rails (~> 3.2.2) ruby
    rails (4.2.1)

现在,我“认为”这种情况正在发生,因为某些依赖项明确要求 Rails 3.2.2。 (如有错误请指正)

我的问题是,我可以做些什么来尝试让依赖项停止寻找旧版本的 Rails?

感谢您的宝贵时间! :)

【问题讨论】:

    标签: ruby ruby-on-rails-4 openid


    【解决方案1】:

    它是依赖于 rails 的 masq。查看gemspec: https://github.com/dennisreimann/masq/blob/master/masq.gemspec

    问题是生成的 rails 应用程序可能使用 rails4 而 masq 使用 rails3。

    2 个选项:
    - 为应用程序使用 rails3
    - 更新 rails4 的 masq

    我个人会选择第一个选项。 对于第二条路线,请查看 https://github.com/dennisreimann/masq/pulls 和该项目的分支,其中一些似乎已针对 rails4 进行了更新。

    【讨论】:

    • 感谢您的回复!不幸的是,目前我们无法选择使用 Rails 3。我们也没有真正的时间来分叉和更新项目。所以我们现在可能只是继续使用 PHP 实现。再次感谢!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-08-14
    • 2011-10-31
    • 2013-06-30
    • 2019-03-28
    • 2023-03-14
    • 2017-07-17
    • 2018-02-09
    相关资源
    最近更新 更多