依赖性错误jekyll-figure

时间:2018-03-12 13:39:29

标签: rubygems jekyll

当我运行bundle exec jekyll serve时,我收到以下错误消息

Dependency Error: Yikes! It looks like you don't have jekyll-figure or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- jekyll-figure' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/! 
jekyll 3.4.0 | Error:  jekyll-figure

我将gem添加到gemfile并进行了捆绑安装...仍然收到错误消息 任何方法来解决这个问题,谢谢。

Gemfile

source “https://rubygems.org”
ruby RUBY_VERSION

# This will help ensure the proper Jekyll version is running.
gem "jekyll", "3.4.0"
gem 'jekyll-paginate'
gem 'jekyll-sitemap'
gem 'jekyll-figure'



# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

配置文件

# Welcome to Jekyll!
#
# This config file is meant for settings that affect your whole blog, values
# which you are expected to set up once and rarely need to edit after that.
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'jekyll serve'. If you change this file, please restart the server process.

# Site settings
title: Name
email: contact@domainname.com
description: > # this means to ignore newlines until "baseurl:"

baseurl: "" # the subpath of your site, e.g. /blog
url: "" # the base hostname & protocol for your site

twitter_username: 
github_username:  
owner:
  name:           Name
  avatar:         images/Your_image.jpg
# Build settings
markdown: kramdown
exclude: ["README.md"]
sass:
    load_paths:
        - _sass
        - bs
paginate: 10
paginate_path: "page:num"
gems:
  - jekyll-paginate
  - jekyll-sitemap
  - jekyll-figure

bundle exec jekyll build --verbose --trace的输出       记录级别:debug     配置文件:/home/justinechacko/Web/govtexam/_config.yml              要求:jekyll-figure       依赖性错误:哎呀!看起来你没有安装jekyll-figure或其中一个依赖项。为了使用当前配置的Jekyll,您需要安装此gem。来自Ruby的完整错误消息是:'无法加载此类文件 - jekyll-figure'如果遇到问题,可以在https://jekyllrb.com/help/找到有用的资源!     /var/lib/gems/2.3.0/gems/jekyll-3.4.0/lib/jekyll/external.rb:53:in rescue in block in require_with_graceful_fail': jekyll-figure (Jekyll::Errors::MissingDependencyException) from /var/lib/gems/2.3.0/gems/jekyll-3.4.0/lib/jekyll/external.rb:41:in块中的require_with_graceful_fail'         来自/var/lib/gems/2.3.0/gems/jekyll-3.4.0/lib/jekyll/external.rb:40:in each' from /var/lib/gems/2.3.0/gems/jekyll-3.4.0/lib/jekyll/external.rb:40:in require_with_graceful_fail'         来自/var/lib/gems/2.3.0/gems/jekyll-3.4.0/lib/jekyll/plugin_manager.rb:27:in require_gems' from /var/lib/gems/2.3.0/gems/jekyll-3.4.0/lib/jekyll/plugin_manager.rb:19:in conscientious_require'         来自/var/lib/gems/2.3.0/gems/jekyll-3.4.0/lib/jekyll/site.rb:111:in setup' from /var/lib/gems/2.3.0/gems/jekyll-3.4.0/lib/jekyll/site.rb:33:in initialize'         from /var/lib/gems/2.3.0/gems/jekyll-3.4.0/lib/jekyll/commands/build.rb:28:in new' from /var/lib/gems/2.3.0/gems/jekyll-3.4.0/lib/jekyll/commands/build.rb:28:in process'         来自/var/lib/gems/2.3.0/gems/jekyll-3.4.0/lib/jekyll/commands/build.rb:16:in block (2 levels) in init_with_program' from /var/lib/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in阻止执行'         来自/var/lib/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in each' from /var/lib/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in执行'         来自/var/lib/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in go' from /var/lib/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in program'         from /var/lib/gems/2.3.0/gems/jekyll-3.4.0/exe/jekyll:13:in <top (required)>' from /usr/local/bin/jekyll:23:in load'         来自/ usr / local / bin / jekyll:23:在''

请调查此问题。感谢。

1 个答案:

答案 0 :(得分:1)

问题在于插件gem的结构。 只需将_config.yml改为加载jekyll/figure而不是..

gems:
  - jekyll-paginate
  - jekyll-sitemap
  - jekyll/figure