Reputation: 8548
I'm trying run Jekyll
server in my local machine, so when I run jekyll server
in terminal, returning fallowing message:
$ jekyll serve
Configuration file: C:/xxx/Site/_config.yml
Source: C:/xxx/Site
Destination: C:/xxx/Site/_site
Generating...
c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/posix-spawn-0.3.11/lib/posix/spawn.rb:164: warning: cannot close fd before spawn
'which' não é reconhecido como um comando interno
ou externo, um programa operável ou um arquivo em lotes.
Liquid Exception: No such file or directory - python c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/pygments.rb-0.6.0/lib/pygments/mentos.py in _posts/2015-06-02-welcome-to-j
ekyll.markdown
done.
Please add the following to your Gemfile to avoid polling for changes:
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
Auto-regeneration: enabled for 'C:/xxx/Site'
Configuration file: C:/xxx/Site/_config.yml
Server address: http://127.0.0.1:4000/
Server running... press ctrl-c to stop.
Cause I trying enter http://127.0.0.1:4000/, is not happen, no error, no 404, only a empty page.
Where is problem?
Upvotes: 2
Views: 512
Reputation: 6947
Python does not appear to be installed, which is why you get a liquid exception when trying to use the code highlighter Pygments.
According to this tutorial, which is the suggested tutorial written by Julian Thilo on the Jekyll documentation, you need Python 2.7.x
at time of writing. Here is a summary of what you need to do to get the Jekyll install and server up and running.
Step 1 : Get Python
Download the latest version of Python 2.7: here
Note: Make sure to add python.exe to Path and select “Entire feature will be installed on local hard drive. This is needed on Windows or else Jekyll will fail to build the website when trying to highlight code with Pygments.
Step 2: Install Pip
It's a Python package manager which you'll use to install Pygments. follow the official documentation for doing this.
Step 3: Get Pygments
Finally, Open up a command line and type in python -m pip install Pygments
Step 4 : Done
Run jekyll serve
again.
Optional Step
Since Pygments is the default syntax highlighter, you don't have to explicitly define what highlighter you're using, but if you prefer to, add this line to your _config.yml
file: highlighter : pygments
ALTERNATIVE 1: Don't want highlighters
If you won't be using a code highlighter just edit the markdown post you have 2015-06-02-welcome-to-jekyll.markdown
and remove the Liquid tags like so:
{% highlight ruby %}
//Ruby code on the template you can ignore
{% endhighlight %}
ALTERNATIVE 2: Rouge, no need for Python
Rouge is a Ruby code highlighter, which while does not require Python and all that dependencies as it is written completely in Ruby (which you already have because Jekyll runs on Ruby). You'll need to edit the _config.yml
to use rouge
like so: highlighter : rouge
, and run gem install rouge
in the command line, as mentioned in same tutorial. Note that at time of writing Rouge has lesser language support compared to Pygments. (but still a whole lot)
Here's another tutorial on setting up Jekyll on Windows. And it would be a good idea to follow the excellent tutorial I've previously linked for installing Jekyll on Windows.
Upvotes: 1