Tuesday, September 20, 2016

Installing Jekyll on OSX

I wanted to play with Jekyll after watching this video. You would usually install it using the terminal using the following command:

$ sudo gem install jekyll

But unfortunately, it failed for me with an error saying:

ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.

It appears the make command is not found on the system. you need to install OSX command line tools.

I'm sure you can download them from Apple somehow (some people say you need to install XCode and then install the Command Line tools from it) but what I found the easiest way to get it into my installation was by installing Homebrew (it's a package manager like apt-get on Unix) using this command:

/usr/bin/ruby -e "$(curl -fsSL"

Then it would run the Homebrew installer but after a few seconds it would pause it and ask you if you want to install the Command Line tools in a separate dialog. You tell it to do that (that's the whole point it all this) and it will take a moment to finish install the tools (1 minute to download, 1-2 minutes to install). After that's done, you press Enter in the Terminal window to resume the installation of Homebrew (sadly I couldn't capture a screenshot to show you, but it's straight forward, so don't be scared) and it will finish after a few seconds.

Now if you run our first command (yes, that one you use to install Jekyll in the first place), it will go through. Now you can play with Jekyll; yay!

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...