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

标签 ruby jekyll github-pages

我在运行 jekyll 以创建 GitHub 页面时遇到问题。按照 documentation 中列出的说明进行操作后,我在编辑 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.

gem 文件

source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
#     bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
# gem "jekyll", "~> 4.2.0"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.5"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
gem "github-pages", "~> 215", group: :jekyll_plugins
# If you have any plugins, put them here!
group :jekyll_plugins do
  gem "jekyll-feed", "~> 0.12"
end

# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
platforms :mingw, :x64_mingw, :mswin, :jruby do
  gem "tzinfo", "~> 1.2"
  gem "tzinfo-data"
end

# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]

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

最佳答案

只需删除 .lock 文件并进行捆绑安装。你会得到一个新的。

关于ruby - 尝试使用 jekyll 时如何解决此捆绑更新错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68411134/

相关文章:

ruby-on-rails - 在测试环境中禁用地理编码

javascript - 当过去累积 10 个属性时, map 标记变得不准确

github - Gh-pages,URL 重写功能,使 SEO 友好的 URL

css - 使用 slate 主题覆盖 github 页面上的 CSS?

css - 为什么我的 CSS 不能在 GitHub Pages 上运行?

github - 静态网站 : I want to host different subdomain (=different directory) on github service?

ruby-on-rails - rails :dependent => :destroy VS :dependent => :delete_all

ruby-on-rails - 我如何运行 rake db :migrate in automated deploy with heroku or heroku-api gem?

ruby-on-rails - 从单独的 Ruby 脚本通过 Rails 模型访问数据库

javascript - Jekyll:为什么我需要配置 Jekyll 来保留这两个 min.js.map 文件?