Syllepsis
Syllepsis

Reputation: 569

Jekyll Liquid Exception: Cannot find /bin/sh on Windows

I installed the Jekyll Gem on Windows via a Ruby installation using the RailsInstaller distribution.

When I try to run jekyll build or any command that includes that as a subcommand, I get the following error:

Jekyll error

2013-03-08-response-ruby-interfaces.md is one of my posts. Any suggestions as to what might be going on? The command builds out the skeleton of the site, in the _site directory, but all of the files are empty. Any suggestions?

Upvotes: 14

Views: 2268

Answers (4)

Mpron
Mpron

Reputation: 132

Adding to @Mon Noval's answer, I would also make sure you run gem list first and look for pygments. I followed Mon Noval's process, and when it still didn't fix things, I ran gem list in the command line and found out that I did have pygments 0.5.0 installed but in the parentheses it was also showing 0.5.4 installed. So make sure you look for any and all versions above 0.5.0!

Works like a charm now!

Upvotes: 0

Mon Noval
Mon Noval

Reputation: 380

I managed to fix doing two things

First is making sure that pygments is running on 0.5.0. At the same time making sure that newer versions are uninstalled

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

Second, well, pygments would need python installed and adding it in

C:\RailsInstaller\Ruby1.9.3\setup_environment.bat

At this line

SET PATH=%RUBY_DIR%\bin;other paths\here;%PATH%

Will become

SET PATH=%RUBY_DIR%\bin;other paths\here;C:\Python27;%PATH%

Close the "Command Prompt with Ruby and Rails" and start again. It will now run jekyll serve without errors

Reference:

Jekyll on Windows: Pygments not working

Upvotes: 8

Felipe
Felipe

Reputation: 78

I was the same and changing the encode solve Use UTF8

Upvotes: 0

tgittos
tgittos

Reputation: 354

I ran into this issue as well and solved it by turning pygments off in my _config.yml:

pygments:    false

Despite having pygments installed, I can't seem to get it to work with Jekyll under Windows.

You lose syntax highlighting, but you gain a working Jekyll install.

Upvotes: 18

Related Questions