芒果iOS开发之ERROR: Error installing rails: Failed to build gem native extension. /nokogiri/gem_make.out

ERROR:  Error installing rails:
ERROR: Failed to build gem native extension.


    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking if the C compiler accepts ... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You mayneed configuration options.


Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/nokogiri-1.6.7.1 for inspection.


Results logged to /Library/Ruby/Gems/2.0.0/gems/nokogiri-1.6.7.1/ext/nokogiri/gem_make.out


在安装taobaogem的时候sudo gem install rails可能会遇到这样的错误,如图:


解决办法如下:

第一步:

sudo gem update --system

第二步:

 xcode-select --install





第三步:

sudo gem install compass

第四步:

重新运行:sudo gem install rails,执行过程中会提示是否重新覆盖,输入y:Overwrite the executable? [yN]  y 如图:





















评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值