madhatter's delicatessen home imprint

Jekyll with Pygments on Arch Linux


As I am trying to blog more I came accross Pygments again and wanted to give it a try. But I had to notice that Jekyll failed to highlight anything, because of Arch Linux using Python3 as default (/usr/bin/python is linked to /usr/bin/python3).
Lots of googling later I found out, that it isn’t exactly Jekyll’s fault, but a problem with the pygments.rb gem. There already is a pull request for this issue which has been opened 3 months ago.
It really is easy to fix though, but I guess it might cause issues on other Linux distributions which have no Python 3 at all and therefore no python2 command available.
For now I went to the gem’s installation path and changed mentos.py manually:

#!/usr/bin/env python2

Quick and very dirty. A better solution probably would be to fork the gem’s repository, patch it to your needs and install that one.


Fork me on GitHub