Skip to content

Ruby on Mac

Ruby on Mac: Fix Command Line Tools Path#

Ruby compilation can fail on macOS when the active Xcode command line tools path points to a deleted or missing Xcode installation.

Example error:

xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist

Install or select the command line tools:

xcode-select --install

If the tools are already installed, switch to them:

sudo xcode-select --switch /Library/Developer/CommandLineTools

Check the active path:

xcode-select -p

Sources#