I\'m stuck trying to install rails on my mac. I have OS X 10.6.8 and I have confirmed that I have Ruby, version 1.8.7
I ran sudo gem update
and su
The Command line tools didn't solve this issue for me. I upgraded ruby installation through rbenv to 2.2.0, made that the global default ruby installation, and this issue was fixed.
Steps to sort out this issue: Follow these steps unless error is fixed.
Not sure what it needs to compile, but OSX can't compile any native ruby extensions at all unless the Apple developer tools are installed. On 10.7 Lion you can download it free from the app store, or Download it here for 10.6: http://developer.apple.com/xcode/index.php
It may also be on your OSX install discs, though probably much more out of date.
https://stackoverflow.com/a/58226876/8070378
Solved after run:
sudo xcode-select --install
sudo xcodebuild -license accept
Im using osx 10.10. You can download from the command-line
xcode-select --install
Just had a similar issue. I can confirm that installing the command line tools fixes it.