最近从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版本对于该项目来说太新了。降级为Ruby 2.4.X
或更新Gemfile的gem。
我删除了解决此问题的Gemfile.lock
文件。
Ruby版本在项目级别上很好,我知道这一点,因为服务器在Mac上运行,因此是Windows或计算机专有的问题。