【问题标题】:How to fix conflicting requirements installing Nokogiri for Rails on Windows如何解决在 Windows 上安装 Nokogiri for Rails 的冲突要求
【发布时间】:2020-04-11 05:03:22
【问题描述】:

最近从 Mac 切换到 PC 并与bundle install 碰壁。

我收到一个错误,但我无法弄清楚它的含义以及如何解决它。我搜索了 GitHub 问题和其他 StackOverflow 线程,但建议的修复都没有帮助我,因为它们主要集中在 Linux 上。

Bundler found conflicting requirements for the Ruby  version:
  In Gemfile:
    Ruby  (~> 2.6.5.0)

    pg was resolved to 0.21.0, which depends on
      Ruby  (< 2.5) x64-mingw32

Ruby  (< 2.5), which is required by gem 'nokogiri (>= 1.4.1)', is not available
in the local ruby installation

【问题讨论】:

标签: ruby-on-rails ruby installation bundler nokogiri


【解决方案1】:

您的 Ruby 版本对于该项目来说太新了。降级到 Ruby 2.4.X 或更新 Gemfile 的 gem。

【讨论】:

    【解决方案2】:

    我删除了修复问题的Gemfile.lock 文件。

    Ruby 版本在项目级别上很好,我知道这是因为服务器在我的 Mac 上运行,所以这是 Windows 或机器独有的问题。

    【讨论】:

      猜你喜欢
      • 2012-01-23
      • 1970-01-01
      • 1970-01-01
      • 2016-09-24
      • 2019-01-10
      • 1970-01-01
      • 1970-01-01
      • 2014-09-22
      • 1970-01-01
      相关资源
      最近更新 更多