David Lambl

Software Developer, Gadget Geek, Foodie

Invalid Active Developer Path on OS X After Installing Ruby

| Comments

I was getting this error,

xcrun: error: invalid active developer path (/Applications/Xcode.app),
missing xcrun at: /Applications/Xcode.app/usr/bin/xcrun

This solution worked, but the error occured again after closing my terminal and reopening it; I had to run the same commands every time I opened a new terminal window.

I found a suggestion here which indicated,

sudo xcode-select -switch /

as the fix. However, this threw an error that the developer path was invalid.

Instead, for me, I modified this to,

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/

(which is a mixture of the two referenced solutions) and everything worked as expected!