美文网首页
Mac OSX安装CocoaPods教程

Mac OSX安装CocoaPods教程

作者: 油麦菜洋葱头 | 来源:发表于2017-10-10 13:28 被阅读0次

    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/ )已经不可用了。官方的需要FQ。所以我们现在用最新支持的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

    出现如下,说明成功

    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

    相关文章

      网友评论

          本文标题:Mac OSX安装CocoaPods教程

          本文链接:https://www.haomeiwen.com/subject/gwuvyxtx.html