Bundler could not find compatible versions for gem “bundler”: In Gemfile:
程序员文章站
2024-01-15 08:53:34
...
在运行jekyll server 的时候遇到的坑:
Fetching gem metadata from https://gems.ruby-china.com/...........
Fetching gem metadata from https://gems.ruby-china.com/.
Resolving dependencies...
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
bundler (~> 1.12) x64-mingw32
Current Bundler version:
bundler (2.1.4)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
Could not find gem 'bundler (~> 1.12)' in any of the relevant sources:
the local ruby installation
原因是bundler version 2.1.4, 但是这个jekyll主题用的bundler version 1.12。所以要降级:
$ gem install bundler -v 1.12
$ bundle _1.12_ install