美文网首页
mac环境下ruby更新

mac环境下ruby更新

作者: MacXin | 来源:发表于2018-03-08 16:14 被阅读0次

    环境 

        mac版本10.12.6 Sierra

        原本想升级cocoapods,但是发现需要先升级gem,升级gem后,发现总是出现如下问题:    

    YAML safe loading is not available. Please upgrade psych to a version that supports safe loading (>= 2.0).

    ERROR:  SSL verification error at depth 1: unable to get local issuer certificate (20)

    ERROR:  You must add /O=Digital Signature Trust Co./CN=DST Root CA X3 to your local trusted store

        查了一下原因说是需要升级ruby.

    升级ruby网上资源很多,参考链接如下:RVM 实用指南 · Ruby China

        过程中又遇到如下问题:

        Error running 'requirements_osx_brew_libs_install libtool coreutils libyaml readline libksba openssl@1.1',

    please read /Users/qixin/.rvm/log/1520495237_ruby-2.4.0/package_install_libtool_coreutils_libyaml_readline_libksba_openssl@1.1.log

    Requirements installation failed with status: 1.

        stack overflow 中找到的大概解决方法链接:ruby - Error running 'requirements_osx_brew_libs_install...' on Mac 10.7 - Stack Overflow

        重要步骤在于,在终端执行如下命令:$ brew install sqlite

        然后遇到提示:

        Xcode alone is not sufficient on Sierra.

    Install the Command Line Tools:

      xcode-select --install

    此时,按提示在终端执行,$xcode-select --install, 即可,

    安装完成后,执行, brew install sqlite,然后成功后,便可执行 rvm install 2.4.0 --disable-binary 安装新的ruby 了。

    相关文章

      网友评论

          本文标题:mac环境下ruby更新

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