Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jekyll on Windows Liquid Exception: Failed to get header

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
like image 828
Jitendra Vyas Avatar asked Jul 23 '13 17:07

Jitendra Vyas


3 Answers

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.

like image 137
Miguel Leite Avatar answered Oct 18 '22 00:10

Miguel Leite


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

like image 41
Stu Mackellar Avatar answered Oct 18 '22 01:10

Stu Mackellar


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

like image 44
flashlib Avatar answered Oct 18 '22 02:10

flashlib