6

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
Jitendra Vyas
  • 148,487
  • 229
  • 573
  • 852
  • 3
    I made it work on you configuration with the following specifications: Only Pigments 0.5.0 works (I had to uninstall 0.5.2 and install 0.5.0 first). Also, in my PATH I had a reference to Python 3.3 instead of Python 2.7 that I had to change back to 2.7. Cf. http://stackoverflow.com/questions/17364028/jekyll-on-windows-pygments-not-working – Maate Aug 09 '13 at 14:31
  • Just add this line to your _config.yml: `highlighter: rouge` it will works fine. – Rizwan Khan Oct 26 '15 at 18:49

4 Answers4

6

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.

Miguel Leite
  • 119
  • 1
  • 9
4

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...

Stu Mackellar
  • 11,510
  • 1
  • 38
  • 59
3

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

flashlib
  • 151
  • 1
  • 6
0

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.