cocoapods install ——2018-05-27

  1. 安裝環(huán)境
    System Version : macOS High Sierra 10.13.4
    Xcode Version : 9.3.1(9E501)

  2. 查看當(dāng)前ruby源

gem sources -l

3.更換源


gem sources --add [https://gems.ruby-china.org/](https://link.jianshu.com/?t=https://gems.ruby-china.org/) --remove [https://rubygems.org/](https://link.jianshu.com/?t=https://rubygems.org/)

4.檢查ruby源是否更換成功


gem sources -l

顯示下方信息表示更換成功:


*** CURRENT SOURCES ***

https://gems.ruby-china.org/

5.更新ruby源


sudo gem update --system

6.安裝cocoapods


sudo gem install -n /usr/local/bin cocoapods

安裝成功后顯示下方的信息:

......
......
Installing ri documentation for nanaimo-0.2.5
Parsing documentation for xcodeproj-1.5.9
Installing ri documentation for xcodeproj-1.5.9
Parsing documentation for escape-0.0.4
Installing ri documentation for escape-0.0.4
Parsing documentation for fourflusher-2.0.1
Installing ri documentation for fourflusher-2.0.1
Parsing documentation for gh_inspector-1.1.3
Installing ri documentation for gh_inspector-1.1.3
Parsing documentation for ruby-macho-1.1.0
Installing ri documentation for ruby-macho-1.1.0
Parsing documentation for cocoapods-1.5.3
Installing ri documentation for cocoapods-1.5.3
Done installing documentation for concurrent-ruby, i18n, thread_safe, tzinfo, activesupport, nap, fuzzy_match, cocoapods-core, claide, cocoapods-deintegrate, cocoapods-downloader, cocoapods-plugins, cocoapods-search, cocoapods-stats, netrc, cocoapods-trunk, cocoapods-try, molinillo, atomos, CFPropertyList, colored2, nanaimo, xcodeproj, escape, fourflusher, gh_inspector, ruby-macho, cocoapods after 21 seconds
28 gems installed
MacBook-Pro:~ system$ 

7.檢驗(yàn)是否安裝成功

pod search 'Masonry'
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

友情鏈接更多精彩內(nèi)容