Error Message Xcode alone is not sufficient on Sierra
Let me explain this myself so people won't make the same mistakes.
When I saw the last line of the error message
Error: Xcode alone is not sufficient on Sierra.
Install the Command Line Tools:
xcode-select --install
My thought was: I already have Xcode why the system ask me to "reinstall" it. However, thanks for @SamiKuhmonen @ Beartech @patrick kuang suggestion, I search a page (in Mandarin). xcode-select --install
does not reinstall the whole Xcode. It means install some missing command line tools which is required by installing Ruby.
Homebrew saying Xcode is outdated
So as @NicolasMiari mentioned in a comment above, the fix to my issue ended up having to have both Xcode 7 and Xcode 8 on my machine. I went on the apple developer site, downloaded Xcode 8, saved it to my documents and then used:
sudo xcode-select -switch ~/Documents/Xcode.app/
and then ran my brew install which worked as expected. Afterwards I ran:
sudo xcode-select -switch /Applications/Xcode.app/
to switch back to Xcode 7.3.1.
Hope this helps someone else, and thanks for the suggestions.
Failed to install command line tools on OSX Mavericks
Install them from here. You must be a registered developer.
Other solution is: in xcode click Xcode>Open Developer Tool>More Developer Tools
This should then take you to a link which will require a developer Apple ID sign in. From there, you'll be redirected after authenticating to https://developer.apple.com/download/more/ where you can manually download and install the Command Line Tools.
xcode-select active developer directory error
This problem happens when xcode-select
developer directory was pointing to /Library/Developer/CommandLineTools
when a full regular Xcode was required (happens when CommandLineTools are installed after Xcode)
Solution:
- Install Xcode (get it from https://appstore.com/mac/apple/xcode) if you don't have it yet.
- Accept the Terms and Conditions.
- Ensure Xcode app is in the
/Applications
directory (NOT/Users/{user}/Applications
). - Point
xcode-select
to the Xcode app Developer directory using the following command:sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
Note: Make sure your Xcode app path is correct.
- Xcode:
/Applications/Xcode.app/Contents/Developer
- Xcode-beta:
/Applications/Xcode-beta.app/Contents/Developer
Command Line Tools not working - OS X El Capitan, Sierra, High Sierra, Mojave
Found the fix for the problem here.
xcode-select --install
This will bring up a prompt to install the necessary command line tools.
Related Topics
What Is the Send() Method Used For
Error Installing Any Ruby Version with Rvm on Osx
Rails 5.2.0 with Ruby 2.5.1 Console - 'Warning:' 'Already' Initialized Constant Fileutils::Version
Cannot Install Aptana Plugin on Eclipse 4.2
How to Make Rails 3 Assets Precompile Faster
Rails Development Server Is Slow and Takes a Long Time to Load a Simple Page
How to Filter an Array of Hashes to Get Only the Keys in Another Array
How to Open Files Relative to Home Directory
Ruby Strftime: Month Without Leading Zero
How to Do Standard Deviation in Ruby
Uninstall Ruby Version from Rbenv
Rails Flash Message Remains for Two Page Loads
Can't Use Compass After Installing It
Instance and Class Variables in Rails Controller
Suitability of Rails, Padrino, and Sinatra for Building a Prepaid Mobile Service
I Need to Generate Uuid for My Rails Application. What Are the Options(Gems) I Have