参考:
http://www.cnblogs.com/wayne23/p/3912882.html.
OS X系统已经安装过Ruby了,因此我们只需执行以下命令:1sudo gem install -n /usr/local/bin cocoapods
由于某些原因,执行时会出现下面的错误提示:
12ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why: Unable to download data from https://rubygems.org/ - Errno::EPIPE: Broken pipe - SSL_connect (https://rubygems.org/latest_specs.4.8.gz)
可以多试几次,或者使用淘宝的代理,执行以下命令。1234$ gem sources -l$ gem sources --remove https://rubygems.org/$ gem sources -a https://ruby.taobao.org/$ gem sources -l
然后重新安装:1sudo gem install -n /usr/local/bin cocoapods
|
|
|
|