macOS installation

You need to install the Xcode Command Line tools, which you can do so with the following command:

xcode-select --install
If you already have the Xcode Command Line tools installed, you will see the following information displayed in the Terminal: 

Ruby comes preinstalled on current macOS operating system, so you only need to run the following command to install Travis CLI:

Here I used sudo because I needed elevated administrator privileges to install RubyGem.

You will know that Travis CLI is installed if you see this message ...

Get Hands-On Continuous Integration and Delivery now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.