安装ruby环境出现Failed to build gem native extension的解决办法 打开xcode,打开xcode->server选项卡,在locations一栏里,的Command line Tools:设置选择一个: OK了