Jekyll为什么找不到我的Gemfile.lock中显示的宝石?

问题描述 投票:0回答:1

首先,我知道冒着这个问题已经在其他地方得到回答的风险,但是由于我不知道这个问题的根源,所以我不确定要寻找什么来找到回答。

问题

我在本地运行bundle和Jekyll,效果很好。但是,当我在Travis-CI上安装时,会出现错误Could not find public_suffix-4.0.4 in any of the sources。但是,public_suffix-4.0.4显然在我的Gemfile.lock中。

我的问题

什么可能导致问题,我应该寻找什么提示来找到答案?

错误消息

Could not find public_suffix-4.0.4 in any of the sources

。travis.yml

(相关部分)

script:
- gem install jekyll
- bundle install --full-index 
- bundle exec jekyll build -d _build

Gemfile

# frozen_string_literal: true

source "https://rubygems.org"

git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }

# gem "rails"

gem "jekyll", "~> 4.0"

Gemfile.lock

GEM
  remote: https://rubygems.org/
  specs:
    addressable (2.7.0)
      public_suffix (>= 2.0.2, < 5.0)
    colorator (1.1.0)
    concurrent-ruby (1.1.6)
    em-websocket (0.5.1)
      eventmachine (>= 0.12.9)
      http_parser.rb (~> 0.6.0)
    eventmachine (1.2.7)
    ffi (1.12.2)
    forwardable-extended (2.6.0)
    http_parser.rb (0.6.0)
    i18n (1.8.2)
      concurrent-ruby (~> 1.0)
    jekyll (4.0.0)
      addressable (~> 2.4)
      colorator (~> 1.0)
      em-websocket (~> 0.5)
      i18n (>= 0.9.5, < 2)
      jekyll-sass-converter (~> 2.0)
      jekyll-watch (~> 2.0)
      kramdown (~> 2.1)
      kramdown-parser-gfm (~> 1.0)
      liquid (~> 4.0)
      mercenary (~> 0.3.3)
      pathutil (~> 0.9)
      rouge (~> 3.0)
      safe_yaml (~> 1.0)
      terminal-table (~> 1.8)
    jekyll-sass-converter (2.1.0)
      sassc (> 2.0.1, < 3.0)
    jekyll-watch (2.2.1)
      listen (~> 3.0)
    kramdown (2.1.0)
    kramdown-parser-gfm (1.1.0)
      kramdown (~> 2.0)
    liquid (4.0.3)
    listen (3.2.1)
      rb-fsevent (~> 0.10, >= 0.10.3)
      rb-inotify (~> 0.9, >= 0.9.10)
    mercenary (0.3.6)
    pathutil (0.16.2)
      forwardable-extended (~> 2.6)
    public_suffix (4.0.4)
    rb-fsevent (0.10.3)
    rb-inotify (0.10.1)
      ffi (~> 1.0)
    rouge (3.18.0)
    safe_yaml (1.0.5)
    sassc (2.2.1)
      ffi (~> 1.9)
    terminal-table (1.8.0)
      unicode-display_width (~> 1.1, >= 1.1.1)
    unicode-display_width (1.7.0)

PLATFORMS
  ruby

DEPENDENCIES
  jekyll (~> 4.0)

BUNDLED WITH
   2.1.4

ruby jekyll bundle travis-ci
1个回答
0
投票

如果另一个bundle install不起作用,请删除Gemfile.lock,然后尝试像这样在public_suffix中指定Gemfile的版本:

gem "public_suffix", "~> 4.0.4"

然后运行:

bundle update jekyll
bundle install
bundle exec jekyll serve
© www.soinside.com 2019 - 2024. All rights reserved.