CocoaPods最新版本升级
生活随笔
收集整理的這篇文章主要介紹了
CocoaPods最新版本升级
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
升級CocoaPods的步驟和安裝的時候差不多,具體參考如下步驟:
1. 首先我們可以查看下當(dāng)前的版本號命令如下:
pod --version1.2.0 // 本機安裝的版本 復(fù)制代碼2. 在升級之前我們需要了解當(dāng)前安裝的Ruby源地址:
gem source -l*** CURRENT SOURCES ***http://rubygems.org/ https://gems.ruby-china.org/ https://ruby.taobao.org/ 復(fù)制代碼上面我已經(jīng)添加過新的源
3. 移除淘寶的Ruby源,添加一個新的源(注意:目前淘寶的源已經(jīng)不能用了)
// 移除舊的源 gem sources --remove https://ruby.taobao.org/ https://ruby.taobao.org/ removed from sources// 添加新的源 gem sources -a https://gems.ruby-china.org/ // 因為已經(jīng)添加過了 source https://gems.ruby-china.org/ already present in the cache 復(fù)制代碼4. 查看新的源是否添加成功,使用的命令和步驟2一樣
gem source -l*** CURRENT SOURCES ***https://gems.ruby-china.org/ 復(fù)制代碼5. 開始安裝,輸入如下命令:
sudo gem install cocoapodsPassword: Fetching: cocoapods-core-1.5.0.gem (100%) Successfully installed cocoapods-core-1.5.0 Fetching: claide-1.0.2.gem (100%) Successfully installed claide-1.0.2 Fetching: cocoapods-deintegrate-1.0.2.gem (100%) Successfully installed cocoapods-deintegrate-1.0.2 Fetching: cocoapods-downloader-1.2.0.gem (100%) Successfully installed cocoapods-downloader-1.2.0 Fetching: netrc-0.11.0.gem (100%) Successfully installed netrc-0.11.0 Fetching: cocoapods-trunk-1.3.0.gem (100%) Successfully installed cocoapods-trunk-1.3.0 Fetching: molinillo-0.6.5.gem (100%) Successfully installed molinillo-0.6.5 Fetching: atomos-0.1.2.gem (100%) Successfully installed atomos-0.1.2 Fetching: colored2-3.1.2.gem (100%) Successfully installed colored2-3.1.2 Fetching: nanaimo-0.2.5.gem (100%) Successfully installed nanaimo-0.2.5 Fetching: xcodeproj-1.5.7.gem (100%) Successfully installed xcodeproj-1.5.7 Fetching: ruby-macho-1.1.0.gem (100%) Successfully installed ruby-macho-1.1.0 Fetching: cocoapods-1.5.0.gem (100%) Successfully installed cocoapods-1.5.0 Parsing documentation for cocoapods-core-1.5.0 Installing ri documentation for cocoapods-core-1.5.0 Parsing documentation for claide-1.0.2 Installing ri documentation for claide-1.0.2 Parsing documentation for cocoapods-deintegrate-1.0.2 Installing ri documentation for cocoapods-deintegrate-1.0.2 Parsing documentation for cocoapods-downloader-1.2.0 Installing ri documentation for cocoapods-downloader-1.2.0 Parsing documentation for netrc-0.11.0 Installing ri documentation for netrc-0.11.0 Parsing documentation for cocoapods-trunk-1.3.0 Installing ri documentation for cocoapods-trunk-1.3.0 Parsing documentation for molinillo-0.6.5 Installing ri documentation for molinillo-0.6.5 Parsing documentation for atomos-0.1.2 Installing ri documentation for atomos-0.1.2 Parsing documentation for colored2-3.1.2 Installing ri documentation for colored2-3.1.2 Parsing documentation for nanaimo-0.2.5 Installing ri documentation for nanaimo-0.2.5 Parsing documentation for xcodeproj-1.5.7 Installing ri documentation for xcodeproj-1.5.7 Parsing documentation for ruby-macho-1.1.0 Installing ri documentation for ruby-macho-1.1.0 Parsing documentation for cocoapods-1.5.0 Installing ri documentation for cocoapods-1.5.0 Done installing documentation for cocoapods-core, claide, cocoapods-deintegrate, cocoapods-downloader, netrc, cocoapods-trunk, molinillo, atomos, colored2, nanaimo, xcodeproj, ruby-macho, cocoapods after 9 seconds 13 gems installed 復(fù)制代碼報錯:
-
Operation not permitted - /usr/bin/xcodeproj
解決辦法:sudo gem install -n /usr/local/bin cocoapods 復(fù)制代碼 -
While executing gem ... (TypeError) no implicit conversion of nil into String
// 解決辦法是執(zhí)行如下命令更新gem sudo gem update --system 復(fù)制代碼
6. 再次查看下CocoaPods的版本,已經(jīng)成功升級咯!
pod --version1.5.0 復(fù)制代碼總結(jié)
以上是生活随笔為你收集整理的CocoaPods最新版本升级的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux ssh 报错failed -
- 下一篇: 在 Raspberry Pi 3B 上安