问题描述:

I'm trying to use Jekyll on my windows 7 (64bit) PC.

I have installed Ruby, Ruby Devkit, Python 2.7, Jekyll and Pygments but getting this error

E:\jekyll\my-site>jekyll serve

Configuration file: E:/jekyll/my-site/_config.yml

Source: E:/jekyll/my-site

Destination: E:/jekyll/my-site/_site

Generating... Liquid Exception: Failed to get header. in 2013-07-19-welcome-to-jekyll.markdown

error: Failed to get header.. Use --trace to view backtrace

网友答案:

I also got this error, and a couple of other similar errors too, and finally got to a solution: you need to have a couple of compatible versions of the required Ruby, Python and Pygments.

  • Install Ruby 1.9.3-p448 version (download here);
  • Install Python 2.7.5 version (download here);
  • Install Pygments 0.5.0

    gem uninstall pygments.rb
    gem install pygments.rb --version "=0.5.0"

I hope it helps.

Edited: Don't forget to add the correct PATHs to your system variables. In my case, it was:

C:\Python27;C:\Ruby193


In order to improve this content, there is a simple tutorial (written in Portuguese, but I guess you can understand the steps, always considering the versions of software/plugins listed above) - view tutorial.

网友答案:

Another possible cause for this error message on Windows is that the path to the Pygments scripts contains spaces. Took me a while to figure this one out...

网友答案:

For my situation, install pygments 0.5.0 or 0.5.4 both have problem. I fixed by re-install python 2.7.6. Please refer to following answer: https://github.com/jekyll/jekyll/issues/1181#issuecomment-35963876

网友答案:

I had two versions of python installed on my system.(Windows 8.1) Python22 and Python27. I removed Python22, added Python27 to System variables and issue got fixed.

相关阅读:
Top