Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML Build a Blog with Jekyll and GitHub Pages Getting Started with Jekyll Creating a Jekyll Project

Seth Kroger
Seth Kroger
56,413 Points

Error running 'jekyll serve': "Liquid Exception: Failed to get header."

This error seems to be caused because of a component of jekyll that uses Python, not Ruby, and only works with Python 2.7 but not versions 3.+. See https://github.com/jekyll/jekyll/issues/1181

Python 2.7 is pre-installed by default on Linux and Mac OS X but not Windows. Go to https://www.python.org/downloads/ and download the latest 2.7 version (not 3+) and install making sure the Add to PATH option is selected.

This fixed the issue for me.

Jonathan Chua
Jonathan Chua
4,136 Points

I installed Jekyll on a Codeanywhere DevBox and ran into the same error. The problem is that you have to create a Ruby DevBox in order to run Jekyll, and by default it does not have Python installed. You can bypass this by using an alternative to pygments as your syntax highlighter. Here is what I did.

gem install rouge

Then, in the _config.yml file, add this under the Build settings to make rogue your syntax highlighter.

highlighter: rogue

3 Answers

John McErlain
John McErlain
12,508 Points

Thanks for posting this. I had a similar problem on Windows 8.1. I already had Python version 2.7 on the machine and simply added it to the path which enabled the local server to function properly.

Matthew Rigdon
Matthew Rigdon
8,223 Points

I had the same issue, thank you for the quick fix!

Enrico Elizan
Enrico Elizan
2,106 Points

How do you add it to the path?

Seth Kroger
Seth Kroger
56,413 Points

It will be one of the options when you install, near the bottom of the list.