【问题标题】:Jekyll serve didn't work: It looks like you don't have pygments or one of its dependencies installedJekyll 服务不起作用:看起来您没有安装 pygments 或其依赖项之一
【发布时间】:2016-01-31 01:23:25
【问题描述】:
Configuration file: /Users/andrechristoga/Documents/type-theme/_config.yml
       Deprecation: You appear to have pagination turned on, but you haven't included the `jekyll-paginate` gem. Ensure you have `gems: [jekyll-paginate]` in your configuration file.
            Source: /Users/andrechristoga/Documents/type-theme
       Destination: /Users/andrechristoga/Documents/type-theme/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
  Dependency Error: Yikes! It looks like you don't have pygments 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 -- pygments' If you run into trouble, you can find helpful resources at http://jekyllrb.com/help/! 
  Liquid Exception: pygments in /Users/andrechristoga/Documents/type-theme/_posts/2014-11-28-markdown-and-html.md
             ERROR: YOUR SITE COULD NOT BE BUILT:
                    ------------------------------------
                    pygments

这些是我输入jekyll serve时的消息。

【问题讨论】:

  • 安装 pygments:gem install pygments.rb

标签: jekyll pygments


【解决方案1】:

我遇到了同样的问题,但在安装 pygments gem 时修复了它。

gem install pygments.rb

并将其添加到我的 Gemfile。

gem 'pygments.rb'

【讨论】:

  • 在我的 jekyll 模板中,我没有 Gemfile
【解决方案2】:

如果你使用命令sudo gem install pygments.rbgem install pygments.rb,它可能不起作用

所以你可以试试root:

su root
gem install pygments.rb

这解决了我的问题。

【讨论】:

【解决方案3】:

如果您是 windows 用户,您可以以管理员身份运行 CLI。这会有所帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-12-18
    • 1970-01-01
    • 1970-01-01
    • 2022-08-22
    • 1970-01-01
    • 2015-04-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多