How To Install Jekyll on a Mac, the Easy Way (2 steps!)

It pains my heart to see folks struggle to install Jekyll, through no fault of their own. Some people spend DAYS trying to figure it out. They ask on the Jekyll Forum, Stack Overflow, and other sites, where well-meaning people try to help but unfortunately provide incorrect or outdated solutions. It shouldn't be this frustrating!

The main reason people struggle is due to a combination of overly complicated manual installation instructions, incomplete, hard-to-read troubleshooting guides, and inconsistent advice. The main thing that is not clear to beginners is that they first need to set up a proper Ruby environment. Once that's done, installing any Ruby gem is a breeze. The problem is that there are various ways to install Ruby on a Mac, but the Ruby community hasn't adopted a consistent choice.

I believe in simplifying things as much as possible, so that people who are new to Ruby don't have to suffer. This is why I wrote a script that provides a working Ruby development environment on a Mac, using a Ruby manager, which I strongly believe should be the only way to install Ruby. It sets people up for success for the long term. My script can be run safely multiple times. It only installs what you don't already have, and it upgrades any outdated tools. It also automatically detects which shell you are using, and configures your shell startup file with the proper PATH and commands. That way, you don't run into the "jekyll: command not found" error.

Once you run my script and you see "All done!" in your Terminal, make sure to quit and restart Terminal, then you should be able to install Jekyll by running this command in your Terminal:

gem install jekyll

And then you can verify the jekyll command is working by checking the Jekyll version:

jekyll -v

Or you can look up all the possible commands:

jekyll help

My dream is that all Ruby projects will provide a script to set up Ruby, instead of complicated installation instructions, which include multiple ways of installing Ruby, and that ask people to run commands to figure out which shell they are using so they can manually update the correct file. All of this can and should be automated!