Bundler 找不到 gem "bundler" 的兼容版本:在 Gemfile 中:

Ale*_*ang 5 ruby rubygems github jekyll

我正在用 Jekyll 制作 GitHub 博客页面。我失败了很多次,只是分叉了一个新的,然后按照存储库上的自述文件进行操作。

它是https://github.com/janczizikow/sleek/blob/master/README.md ,我试图在目录(主)内运行,但这个味精不断出现。

我在互联网上尝试了 'gem install bundler' 'gem cleanup' 和类似的解决方案,但仍然无法修复它。我知道我需要另一个较低的版本,那么如何删除当前版本并安装我需要的版本?

我从未使用过 Ruby,所以我很迷茫。一点建议将意味着很多。

bundle install
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "bundler":
  In Gemfile:
    bundler (~> 1.12) x64-mingw32

  Current Bundler version:
    bundler (2.0.2)
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
Run Code Online (Sandbox Code Playgroud)

Chr*_*ian 5

版本 2.0.2 来自gem install bundler,但该项目使用捆绑程序版本 1.12。

要解决您的问题,请运行

  1. gem install bundler -v 1.12
  2. bundle _1.12_ install

要启动 Jekyll 运行jekyll servebundle exec jekyll serve.