Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 607
Syllepsis Avatar asked Jun 27 '13 01:06

Syllepsis


2 Answers

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.

like image 167
tgittos Avatar answered Nov 09 '22 19:11

tgittos


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

like image 40
Mon Noval Avatar answered Nov 09 '22 20:11

Mon Noval