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
There are two possible reasons for the fail:
Verifying Xcode Command Line Tools Installation manually:
Check for presence of
"/usr/include/iconv.h" (if absent=>Missing or improperly installed Xcode CLT)
Installing Xcode CLT:
Try running xcode-select --install on terminal and follow the instructions. If it fails, open Xcode.app, select from menu "Xcode" - "Open Developer Tool" - "More Developer Tools" to open the developer site, download the installer for your OS version and run it.
Hope it helps!