最近新电脑重新装cocoapods遇到了问题
1.首先查看源,gem source -l
会出现*** CURRENT SOURCES ***
https://gems.ruby-china.org
如果不是这个请换成这个,淘宝的已经不能用啦
2.安装cocoapods
sudo gem install -n /usr/local/bin cocoapods —pre
套输入密码,然后
Successfully installed cocoapods-1.2.0
Parsing documentation for cocoapods-1.2.0
Done installing documentation for cocoapods after 2 seconds
1 gem installed
3.看看版本
pod —version
出现 1.2.0
开始安装 pod setup
可能会出现这个问题
Setting up CocoaPods master repo
$ /usr/bin/git clone https://github.com/CocoaPods/Specs.git master --progress
Cloning into 'master'...
remote: Counting objects: 1076833, done.
remote: Compressing objects: 100% (100/100), done.
error: RPC failed; curl 56 SSLRead() return error -980654.00 KiB/s
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
[!] /usr/bin/git clone https://github.com/CocoaPods/Specs.git master --progress
Cloning into 'master'...
remote: Counting objects: 1076833, done.
remote: Compressing objects: 100% (100/100), done.
error: RPC failed; curl 56 SSLRead() return error -980654.00 KiB/s
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
解决办法
gem install rails
出现
Successfully installed rails-5.0.1
Parsing documentation for rails-5.0.1
Done installing documentation for rails after 0 seconds
1 gem installed
开始安装 pod setup
会等很久
Setting up CocoaPods master repo
$ /usr/bin/git clone https://github.com/CocoaPods/Specs.git master --progress
Cloning into 'master'...
remote: Counting objects: 1076992, done.
remote: Compressing objects: 100% (248/248), done.
remote: Total 1076992 (delta 88), reused 4 (delta 4), pack-reused 1076725
Receiving objects: 100% (1076992/1076992), 374.99 MiB | 49.00 KiB/s, done.
Resolving deltas: 100% (503235/503235), done.
Checking out files: 100% (136384/136384), done.
Setup completed
完成啦
附:【链接】终端更新Ruby步骤和遇见奇葩问题的解决办法
http://www.jianshu.com/p/8169f5d7f364