You need to install the Xcode Command Line tools, which you can do so with the following command:
xcode-select --install
Ruby comes preinstalled on current macOS operating system, so you only need to run the following command to install Travis CLI:
You will know that Travis CLI is installed if you see this message ...