美文网首页Cocoapods安装各种坑及解决方案
cocoapods的安装 遇到 Error installing

cocoapods的安装 遇到 Error installing

作者: 秋燕归 | 来源:发表于2016-09-17 23:43 被阅读37次

    错误提示:

    Error installing cocoapods:  activesupport requires Ruby version >= 2.2.2.

    解决方案 :

    1、安装 RVM baby 版本管理器

    $curl -L get.rvm.io | bash -s stable

    //安装完成提示如下信息

    In case of problems: https://rvm.io/helpandhttps://twitter.com/rvm_io

    2、执行

    $source ~/.bashrc

    $source ~/.bash_profile

    3、查看版本

    $rvm -v

    //提示以下信息

    rvm 1.27.0 (latest) by Wayne E. Seguin, Michal Papis[https://rvm.io/]

    4、用RVM升级Ruby查看当前ruby版本

    $ruby -v

    $rvm list known

    //提示以下信息

    # MRI Rubies

    [ruby-]1.8.6[-p420]

    [ruby-]1.8.7[-head] # security released on head

    [ruby-]1.9.1[-p431]

    [ruby-]1.9.2[-p330]

    [ruby-]1.9.3[-p551]

    [ruby-]2.0.0[-p648]

    [ruby-]2.1[.8]

    [ruby-]2.2[.4]

    [ruby-]2.3[.0]

    [ruby-]2.2-head

    ruby-head

    # for forks use: rvm install ruby-head- --url https://github.com/github/ruby.git --branch 2.2

    5、安装ruby 2.2.2 执行

    $rvm install 2.2.2

    如果打印:

    promote:~ shefeng$ rvm install 2.2.2

    Searching for binary rubies, this might take some time.

    Found remote file https://rvm_io.global.ssl.fastly.net/binaries/osx/10.11/x86_64/ruby-2.2.2.tar.bz2

    Checking requirements for osx.

    Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.

    Requirements installation successful.

    ruby-2.2.2 - #configure

    ruby-2.2.2 - #download

    % Total% Received % XferdAverage SpeedTimeTimeTimeCurrent

    DloadUploadTotalSpentLeftSpeed

    100 6854k100 6854k00126k00:00:540:00:54 --:--:--336k

    ruby-2.2.2 - #validate archive

    ruby-2.2.2 - #extract

    ruby-2.2.2 - #validate binary

    ruby-2.2.2 - #setup

    ruby-2.2.2 - #gemset created /Users/shefeng/.rvm/gems/ruby-2.2.2@global

    ruby-2.2.2 - #importing gemset /Users/shefeng/.rvm/gemsets/global.gems.........-

    ruby-2.2.2 - #generating global wrappers........

    ruby-2.2.2 - #gemset created /Users/shefeng/.rvm/gems/ruby-2.2.2

    ruby-2.2.2 - #importing gemsetfile /Users/shefeng/.rvm/gemsets/default.gems evaluated to empty gem list

    ruby-2.2.2 - #generating default wrappers........

    Updating certificates in '/etc/openssl/cert.pem'.

    mkdir: /etc/openssl: Permission denied

    mkdir -p "/etc/openssl" failed, retrying with sudo

    shefeng password required for 'mkdir -p /etc/openssl':

    and sudo mkdir worked

    则说明安装成功了

    6、设置默认版本

    $ rvm use 2.2.2 --default

    提示一下信息即成功

    Using /Users/shefeng/.rvm/gems/ruby-2.2.2

    相关文章

      网友评论

        本文标题:cocoapods的安装 遇到 Error installing

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