尝试使用 jekyll 时如何解决此捆绑包更新错误?

Sop*_*hia 3 ruby jekyll github-pages

我在运行 jekyll 来创建 GitHub 页面时遇到问题。按照文档中列出的说明进行操作后,在编辑 Gemfile 并尝试运行后,我不断收到错误消息bundle update。错误是:

Bundler could not find compatible versions for gem "terminal-table":
  In snapshot (Gemfile.lock):
    terminal-table (>= 2.0.0)

  In Gemfile:
    github-pages (~> 215) was resolved to 215, which depends on
      terminal-table (~> 1.4)'


  I reinstalled terminal-table using 'gem install terminal-table', and listing my gems using 'gem list' I can see that I have version 3.0.1 installed, so I don't understand the error.

Thanks.
Run Code Online (Sandbox Code Playgroud)

Gemfile

Bundler could not find compatible versions for gem "terminal-table":
  In snapshot (Gemfile.lock):
    terminal-table (>= 2.0.0)

  In Gemfile:
    github-pages (~> 215) was resolved to 215, which depends on
      terminal-table (~> 1.4)'


  I reinstalled terminal-table using 'gem install terminal-table', and listing my gems using 'gem list' I can see that I have version 3.0.1 installed, so I don't understand the error.

Thanks.
Run Code Online (Sandbox Code Playgroud)

Gemfile.lock

GEM
  remote: https://rubygems.org/
  specs:
    addressable (2.8.0)
      public_suffix (>= 2.0.2, < 5.0)
    colorator (1.1.0)
    concurrent-ruby (1.1.9)
    em-websocket (0.5.2)
      eventmachine (>= 0.12.9)
      http_parser.rb (~> 0.6.0)
    eventmachine (1.2.7)
    ffi (1.15.3)
    forwardable-extended (2.6.0)
    http_parser.rb (0.6.0)
    i18n (1.8.10)
      concurrent-ruby (~> 1.0)
    jekyll (4.2.0)
      addressable (~> 2.4)
      colorator (~> 1.0)
      em-websocket (~> 0.5)
      i18n (~> 1.0)
      jekyll-sass-converter (~> 2.0)
      jekyll-watch (~> 2.0)
      kramdown (~> 2.3)
      kramdown-parser-gfm (~> 1.0)
      liquid (~> 4.0)
      mercenary (~> 0.4.0)
      pathutil (~> 0.9)
      rouge (~> 3.0)
      safe_yaml (~> 1.0)
      terminal-table (~> 2.0)
    jekyll-feed (0.15.1)
      jekyll (>= 3.7, < 5.0)
    jekyll-sass-converter (2.1.0)
      sassc (> 2.0.1, < 3.0)
    jekyll-seo-tag (2.7.1)
      jekyll (>= 3.8, < 5.0)
    jekyll-watch (2.2.1)
      listen (~> 3.0)
    kramdown (2.3.1)
      rexml
    kramdown-parser-gfm (1.1.0)
      kramdown (~> 2.0)
    liquid (4.0.3)
    listen (3.5.1)
      rb-fsevent (~> 0.10, >= 0.10.3)
      rb-inotify (~> 0.9, >= 0.9.10)
    mercenary (0.4.0)
    minima (2.5.1)
      jekyll (>= 3.5, < 5.0)
      jekyll-feed (~> 0.9)
      jekyll-seo-tag (~> 2.1)
    pathutil (0.16.2)
      forwardable-extended (~> 2.6)
    public_suffix (4.0.6)
    rb-fsevent (0.11.0)
    rb-inotify (0.10.1)
      ffi (~> 1.0)
    rexml (3.2.5)
    rouge (3.26.0)
    safe_yaml (1.0.5)
    sassc (2.4.0)
      ffi (~> 1.9)
    terminal-table (2.0.0)
      unicode-display_width (~> 1.1, >= 1.1.1)
    unicode-display_width (1.7.0)

PLATFORMS
  x86_64-darwin-19

DEPENDENCIES
  jekyll (~> 4.2.0)
  jekyll-feed (~> 0.12)
  minima (~> 2.5)
  tzinfo (~> 1.2)
  tzinfo-data
  wdm (~> 0.1.1)

BUNDLED WITH
   2.2.24
Run Code Online (Sandbox Code Playgroud)

cho*_* Lu 9

只需删除 .lock 文件并捆绑安装即可。您将得到一件新的。