Installing Jekyll on MacOS (OSX) 10.11+

This is how I managed to install Jekyll. Your experiences may differ but you might find this article useful if you encounter the same problems I did. I’m not going to bother explaining this stuff in detail — such as what every Terminal command is actually doing — because (a) I doubt you care and (b) I’m not entirely sure myself. I’ll just tell you what commands I issued at Terminal and what happened when I did so.

First Installation Attempt - Raw

The prescribed way to install Jekyll on MacOS is via:

gem install jekyll bundler

But you might get an error along the lines of:

You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.

If you do get that error, you might be tempted to run the first command again with sudo on the front. You can certainly try that but you might then get the following error:

Third Installation Attempt - Xcode Fix

I’d suggest a petulant stomp of the feet here but then go into the App Store and install Xcode, even if it’s already on your machine. This takes 10-15 minutes but you should now have the requisite version of Xcode to satisfy all this Homebrew/Ruby nonsense.

Once Xcode is downloaded, open it up and let it configure. I’d then suggest installing Xcode’s command line tools with:

xcode-select --install

This will present a GUI panel asking you to confirm the install. Just let it run — it takes about 5 minutes.

Fourth Installation Attempt - Shell Issues

If any of the above commands fail, maybe with something like rbenv shell command not found, try the following:

pico ~/.bash_profile

Add the following line:

eval "$(rbenv init -)"

CTRL+X out of pico, restart your Terminal session and try again.

If you’ve been lucky, you should now be at the point where you can try installing Jekyll again:

gem install jekyll bundler

If anything else has gone wrong that isn’t covered here I’m afraid you’re on your own, but this worked for me and I could then shut down the 964 Google Search windows I had open in my browser from looking all this stuff up.

Modern install process my arse. Although Jekyll itself is pretty good and it’s worth persevering as long as you’re happy at the Terminal window.