Jekyll install on Windows error message

1.7k views Asked by At

I think I'm just at the finish line for installing jekyll on windows, It's connecting fine, but I'm getting an error message:

Liquid exception: No such file or directory - python C:/Ruby193/lib/ruby/ms/1.9.1/gems/pygments.rb-0.6.3/lib/pygments/mentos.py in _posts/2015-06-09-welcome-to-jekyll.markdown<-[0m done.

Please add the following to your Gemfile to avoid polling for changes: gem 'wdm','>=0.1.0' if Gem.win_platform

I'm not sure what messages I can ignore and what I need to fix. What do you guys think?

If adding this to my gemfile is as simple as entering a cmd prompt, what do I need to enter to install it?

1

There are 1 answers

4
matrixanomaly On BEST ANSWER

This was an issue that was addressed by me by another question a few days ago.This is the original question and my answer.

Basically the issue here is that you need to install Python to use Jekyll on Windows because the code highlighter Pygments is written in Python, hence requires Python to function. Pygments is alsothe default code highlighter currently. In the future versions of Jekyll will use the Rouge highlighter, which is written completely in Ruby. This issue is tracked on GitHub.

To solve your current problem, you just need to install Python 2.x, which the official linked guide from the Jekyll documentation provides very clear instructions there. You will also need to install pip. I have also included alternatives in the other SO answer I have given, so I will just provide you the link to it to reduce duplicate information and copy-paste.

Once you have Python 2.x and pip set up, and install pygments, your Jekyll install should be up and running with the site template!

Regarding the Gemfile

A summary of what a Gemfile is: A file that lists all the required Ruby gems for a particular program. For example, you wrote a ruby program that depends on 10 other gems, rather than ask the user of your new gem to go download the previous 10 gems, and then later wrestle with outdated gem issues, a Gemfile is used to keep track of what gems are needed and version. The Gemfile is used by Bundler, which is also a gem that automatically keeps track of what gems you need. In the case of Jekyll, you can use a Gemfile to dictate what you want added into your Jekyll install or removed. This is used by GitHub to keep local versions of Jekyll and other gems updated with the version used by Github Pages.

As for that notification, all you would need to do to avoid polling for changes is:

  1. Open notepad or text editor of choice.

  2. Add this line: gem 'wdm','>=0.1.0' if Gem.win_platform, just that line of text. You can later add gems by typing in gem 'nameOfGem in a separate line.

  3. Save the file as Gemfile in your Jekyll site's folder. Notice that there is not .txt extension, which you can create a file with no extension in notepad by choosing 'All Files' instead of '.txt' under 'Save As'. Or, you could just edit the file extension to remove the .txt.

  4. Install bundler by executing gem install bundler.

  5. Run bundle install to update the gems. If you're using GitHub, add the Gemfile and the newly generated Gemfile.lock into git.