2
votes

I tried rvm install 2.1

and I got this error:

xcode-select: error: invalid developer directory '/Library/Developer/CommandLineTools' Failed during: /usr/bin/sudo /usr/bin/xcode-select --switch /Library/Developer/CommandLineTools

This happend while I try to run cucumber tests with ruby.

My ruby version is 2.0 and rvm version is 1.29.3 am not able to upgrade .I have Xcode installed

3

3 Answers

3
votes

Please run xcode-select --install to update it to the last version.

If you still have the issue, please check you xcode-select path with xcode-select -p and find the correct path to assign it.

In my case my path is: /Library/Developer/CommandLineTools

so to change the path just run: sudo xcode-select -switch /Library/Developer/CommandLineTools

1
votes

Install xcode-command-line-tools from following link https://developer.apple.com/download/more/

Note : You need apple developer account for this method

or

run following command

xcode-select --install 
0
votes

if you use beta version try "Xcode-beta.app" in your path:

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