公司换了新的iMac,iOS开发系统又需要重新配置,感觉还是挺麻烦的,不过还是要硬着头皮干。
在安转CocoaPods出现了不小的麻烦,其实个人最近喜欢用Carthage(github网址:https://github.com/Carthage/Carthage),因为好用,原因自己看。
下面就是遇到的问题
出现问题提示:
ERROR: While executing gem ...(Gem::FilePermissionError)
You don't have write permissions for the
/Library/Ruby/Gems/2.0.0 directory.
解决方案:
安装新的active support版本: sudo chmod 777 /Library/Ruby/Gems/2.0.0
再执行一下: sudo gem install cocoapods (注意跟之前不一样,要加sudo)
出现问题提示:
Error installing pods:
activesupport requires Ruby version >= 2.2.2.
解决方案:
安装新的active support版本: sudo gem install activesupport -v 4.2.6
再执行一下: sudo gem install cocoapods
出现问题提示:
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/fuzzy_match
解决方案:
sudo gem install -n /usr/local/bin cocoapods