Install Command Line Tools

To install the command line tools to compile native extensions, open a terminal and run:

set SDKROOT (only macOS Catalina or later)

Homebrew is a package managing tool. It’s more popular on Linux but is also used extensively on macOS. In fact, for apps that install as packages, Homebrew is the easiest way to remove them. Here’s how you can install Homebrew on macOS Catalina. In order to install Homebrew on macOS Catalina, you must have Xcode installed. Maybe this is a silly question, but this seems like a horrible abuse of the softwareupdate program. Is there a way to modify its output format or find some other program that allows us to output the data in a different format? Advanced Mac users may appreciate using the Homebrew package manager, which greatly simplifies the process of installing command line software and tools on a Mac. For example, if you want to easily install favorite command line tools on a Mac like cask, htop, wget, nmap, tree, irssi, links, colordiff, or virtually any other familiar unix. Install with a version manager such as asdf, chruby, rbenv, or rvm if you need to switch among Ruby versions (instructions for rbenv are below). See the guide Install Ruby on Mac for details and recommendations. To run the latest Ruby version you need to install it through Homebrew. 👉 Note that the newest versions of macOS (Starting at Catalina) now uses zsh as a default instead of bash. Though, bash version 3 is still installed and available. To find out which macOS version you are running, check out my post How to Find which Mac OS version you are running? Upgrade Bash on Mac with Homebrew.

Catalina

Starting on macOS Catalina (10.15) the headers used for Ruby have been moved from their previous location which results in some gems, including Jekyll to fail installation. This can be solved by setting SDKROOT in your shell configuration to the value provided by xcrun.

Install Ruby

Jekyll requires Ruby v2.5.0 or higher.macOS Big Sur 11.x ships with Ruby 2.6.3. Check your Ruby version using ruby -v.

Install homebrew on mac catalina 2020

If you’re running a previous version of macOS, you’ll have to install a newer version of Ruby. Installation with Homebrew is simple if you’re only planning to use Ruby for Jekyll. Install with a version manager such as asdf, chruby, rbenv, or rvm if you need to switch among Ruby versions (instructions for rbenv are below). See the guide Install Ruby on Mac for details and recommendations.

With Homebrew

To run the latest Ruby version you need to install it through Homebrew.

Add the brew ruby and gems path to your shell configuration:

Relaunch your terminal and check your Ruby setup:

You’re now running the current stable version of Ruby!

With rbenv

People often use rbenv to manage multipleRuby versions. This is very useful when you need to be able to run a given Ruby version on a project.

Install Homebrew On Mac Catalina Free

Restart your terminal to apply your changes.Next, you can install the Ruby version you want. Let’s install the latest stable version:

That’s it! Head over to rbenv command references to learn how to use different versions of Ruby in your projects.

Install Jekyll

After installing Ruby, install Jekyll and Bundler.

Local Install

Install

Install the bundler and jekyll gems:

Install Homebrew On Mac Catalina

Get your Ruby version:

Append your path file with the following, replacing the X.X with the first two digits of your Ruby version:

Check that GEM PATHS: points to your home directory:

Every time you update Ruby to a version in which the first two digits change, update your path to match.

Install Homebrew On Mac Catalina Version

Global Install

Install

We recommend not installing Ruby gems globally to avoid file permissions problems and using sudo.

On Mojave (10.14)

Because of SIP Protections in Mojave, run:

Before Mojave (<10.14)

Run:

Troubleshooting

See Troubleshooting or ask for help on our forum.