Mac OSX安裝CocoaPods教程

1、查看ruby是否安裝,一般需要再更新下

$ruby -v

ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]

$sudo gem update --system

2、更新ruby鏡像

淘寶的那個鏡像(https://ruby.taobao.org/ )已經(jīng)不可用了。官方的需要FQ。所以我們現(xiàn)在用最新支持的ruby鏡像(https://gems.ruby-china.org/)

$gem sources --remove https://rubygems.org/

$gem sources --add https://gems.ruby-china.org/

$gem sources -l? (用來檢查使用替換鏡像位置成功)

3、安裝

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

出現(xiàn)如下,說明成功

Successfully installed xcodeproj-1.4.4

Fetching: ruby-macho-1.1.0.gem (100%)

Successfully installed ruby-macho-1.1.0

Fetching: nap-1.1.0.gem (100%)

Successfully installed nap-1.1.0

Fetching: molinillo-0.5.7.gem (100%)

Successfully installed molinillo-0.5.7

Fetching: gh_inspector-1.0.3.gem (100%)

Successfully installed gh_inspector-1.0.3

Fetching: fourflusher-2.0.1.gem (100%)

Successfully installed fourflusher-2.0.1

Fetching: escape-0.0.4.gem (100%)

Successfully installed escape-0.0.4

Fetching: cocoapods-try-1.1.0.gem (100%)

Successfully installed cocoapods-try-1.1.0

Fetching: netrc-0.7.8.gem (100%)

Successfully installed netrc-0.7.8

Fetching: cocoapods-trunk-1.2.0.gem (100%)

Successfully installed cocoapods-trunk-1.2.0

Fetching: cocoapods-stats-1.0.0.gem (100%)

Successfully installed cocoapods-stats-1.0.0

Fetching: cocoapods-search-1.0.0.gem (100%)

Successfully installed cocoapods-search-1.0.0

Fetching: cocoapods-plugins-1.0.0.gem (100%)

Successfully installed cocoapods-plugins-1.0.0

Fetching: cocoapods-downloader-1.1.3.gem (100%)

Successfully installed cocoapods-downloader-1.1.3

Fetching: cocoapods-deintegrate-1.0.1.gem (100%)

Successfully installed cocoapods-deintegrate-1.0.1

Fetching: fuzzy_match-2.0.4.gem (100%)

Successfully installed fuzzy_match-2.0.4

Fetching: thread_safe-0.3.6.gem (100%)

Successfully installed thread_safe-0.3.6

Fetching: tzinfo-1.2.3.gem (100%)

Successfully installed tzinfo-1.2.3

Fetching: minitest-5.10.2.gem (100%)

Successfully installed minitest-5.10.2

Fetching: i18n-0.8.1.gem (100%)

Successfully installed i18n-0.8.1

Fetching: activesupport-4.2.8.gem (100%)

Successfully installed activesupport-4.2.8

Fetching: cocoapods-core-1.2.1.gem (100%)

Successfully installed cocoapods-core-1.2.1

Fetching: cocoapods-1.2.1.gem (100%)

Successfully installed cocoapods-1.2.1

Parsing documentation for xcodeproj-1.4.4

Installing ri documentation for xcodeproj-1.4.4

Parsing documentation for ruby-macho-1.1.0

Installing ri documentation for ruby-macho-1.1.0

Parsing documentation for nap-1.1.0

Installing ri documentation for nap-1.1.0

Parsing documentation for molinillo-0.5.7

Installing ri documentation for molinillo-0.5.7

Parsing documentation for gh_inspector-1.0.3

Installing ri documentation for gh_inspector-1.0.3

Parsing documentation for fourflusher-2.0.1

Installing ri documentation for fourflusher-2.0.1

Parsing documentation for escape-0.0.4

Installing ri documentation for escape-0.0.4

Parsing documentation for cocoapods-try-1.1.0

Installing ri documentation for cocoapods-try-1.1.0

Parsing documentation for netrc-0.7.8

Installing ri documentation for netrc-0.7.8

Parsing documentation for cocoapods-trunk-1.2.0

Installing ri documentation for cocoapods-trunk-1.2.0

Parsing documentation for cocoapods-stats-1.0.0

Installing ri documentation for cocoapods-stats-1.0.0

Parsing documentation for cocoapods-search-1.0.0

Installing ri documentation for cocoapods-search-1.0.0

Parsing documentation for cocoapods-plugins-1.0.0

Installing ri documentation for cocoapods-plugins-1.0.0

Parsing documentation for cocoapods-downloader-1.1.3

Installing ri documentation for cocoapods-downloader-1.1.3

Parsing documentation for cocoapods-deintegrate-1.0.1

Installing ri documentation for cocoapods-deintegrate-1.0.1

Parsing documentation for fuzzy_match-2.0.4

Installing ri documentation for fuzzy_match-2.0.4

Parsing documentation for thread_safe-0.3.6

Installing ri documentation for thread_safe-0.3.6

Parsing documentation for tzinfo-1.2.3

Installing ri documentation for tzinfo-1.2.3

Parsing documentation for minitest-5.10.2

Installing ri documentation for minitest-5.10.2

Parsing documentation for i18n-0.8.1

Installing ri documentation for i18n-0.8.1

Parsing documentation for activesupport-4.2.8

unable to convert "\x84" from ASCII-8BIT to UTF-8 for lib/active_support/values/unicode_tables.dat, skipping

Installing ri documentation for activesupport-4.2.8

Parsing documentation for cocoapods-core-1.2.1

Installing ri documentation for cocoapods-core-1.2.1

Parsing documentation for cocoapods-1.2.1

Installing ri documentation for cocoapods-1.2.1

23 gems installed

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

相關(guān)閱讀更多精彩內(nèi)容

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