美文网首页
cocoapods流程记录

cocoapods流程记录

作者: 414697ada450 | 来源:发表于2017-04-27 10:56 被阅读4次

    1.移除现有Ruby默认源
    gem sources --remove https://rubygems.org/

    2.使用新的源
    gem sources -a https://gems.ruby-china.org/

    3.验证新源是否替换成功
    gem sources -l

    *** CURRENT SOURCES ***

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

    4.安装 cocoapods
    sudo gem install cocoapods
    出现错误:
    Unable to resolve dependencies: cocoapods requires cocoapods-core (= 1.2.1), cocoapods-downloader (< 2.0, >= 1.1.3), cocoapods-trunk (< 2.0, >= 1.2.0), molinillo (~> 0.5.7), xcodeproj (< 2.0, >= 1.4.4), colored2 (~> 3.1), escape (~> 0.0.4), fourflusher (~> 2.0.1), gh_inspector (~> 1.0), nap (~> 1.0), ruby-macho (~> 1.1); activesupport requires i18n (~> 0.7), tzinfo (~> 1.1), minitest (~> 5.1), thread_safe (>= 0.3.4, ~> 0.3); cocoapods-plugins requires nap (>= 0)

    5命令:sudo gem update --system

    6 再次安装cocoapods
    命令:sudo gem install cocoapods

    错误
    ERROR: While executing gem ... (Errno::EPERM)
    Operation not permitted - /usr/bin/xcodeproj
    解决:
    7
    使用命令 sudo gem install -n /usr/local/bin cocoapods

    相关文章

      网友评论

          本文标题:cocoapods流程记录

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