How to set up jekyll in Mac OS

Reading time ~1 minute

Bought a new computer recently. And trying to set it up my old blog repository.

The instruction on Jekyll website is straight forward. Install with an easy command line and you are done.

However, when I tried to run this command in my Mac terminal, it failed serval time. The error message is:

Operation not permitted - /usr/bin/jekyll

This error is caused by Apple’s System Integrity Protection. Old ruby gem didn’t handle it well.

Jekyll support document gives us two solutions.

The first one is install jekyll with a more complex command line, which is not working for me.

The second solution do give me a clue about installing luby using homebrew. It turns out, homebrew will install a very latest version of ruby. After installing this very latest ruby, I updated my gem with:

sudo gem update --system

This command runs smoothly. But when I tried to run

jekyll serve

It gives me another error message about missing paginate and pygments. Solution to this is pretty straight forward, install them:

sudo gem install jekyll-paginate
sudo gem install pygments.rb

Note: all commands start with sudo will require a super user privilege.

comments powered by Disqus

我想如何死去

## 前言最近一直在思考,到底人生的意义是什么,什么支持我每天起床?我的喜好是什么?然而并没有什么进展。刚刚突然想到,如果反着过来会怎么样呢?我对我的最后一天的幻想也在脑海中linger了很久。而且在写的过程,发现随着内容的慢慢丰富,好像也可以启发我如何走到这一天。## 正...… Continue reading

覆巢之下(1)

Published on July 31, 2023

尚未锦衣,何以还乡

Published on December 15, 2019