Jekyll serve didn't work: It looks like you don't have pygments or one of its dependencies installed

寵の児 提交于 2019-12-20 09:47:10

问题


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

These are the message when I type jekyll serve.


回答1:


I had the same issue but fixed it installing pygments gem.

gem install pygments.rb

And adding it to my Gemfile.

gem 'pygments.rb'



回答2:


if you are a windows user, you could run CLI as administrator. This would help.




回答3:


If you use the command sudo gem install pygments.rb or gem install pygments.rb, it may not works

So you can try root:

su root
gem install pygments.rb

This fix my problem.



来源:https://stackoverflow.com/questions/33439019/jekyll-serve-didnt-work-it-looks-like-you-dont-have-pygments-or-one-of-its-de

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!