Gem installation error: You have to install development tools first This worked for me: sudo xcode-select -switch /