Ruby and “You must recompile Ruby with OpenSSL support or change the sources in your Gemfile”

前端 未结 12 1730
庸人自扰
庸人自扰 2020-12-07 20:31

Using rvm I upgraded my ruby to 1.9.3-p392, also added 2.0.0, anytime I try to use this version when I run my bundle command I get this error.

Could not load         


        
相关标签:
12条回答
  • 2020-12-07 20:48

    I specified a more recent Ruby version in my Gemfile, then ran bundle install. All good now.

    0 讨论(0)
  • 2020-12-07 20:51

    This works for me:

    rvm get stable

    brew install libyaml

    rvm pkg install openssl

    rvm install ruby-2.0.0 --with-openssl-dir=$HOME/.rvm/usr

    rvm use ruby-2.0.0

    All credits go to https://coderwall.com/p/tptocq

    0 讨论(0)
  • 2020-12-07 20:51

    The following steps worked for me.

    First ensure openssl is installed by running brew install openssl, then reinstall the ruby version using rvm, but this time around, you have to pass the with-opt-dir flag pointing to the location where openssl was installed on your machine (use command which openssl to find this location).

    rvm install 1.9.3-p392 --with-openssl-dir=/usr/local/opt/openssl
    
    0 讨论(0)
  • 2020-12-07 20:52

    According to the following question: How to tell which openssl lib is actually being used by an RVM-installed ruby

    It seems that the options --with-openssl-dir=... is no longer valid as of Ruby 1.9.3. I tried

    rvm install 1.9.3 --with-opt-dir=/usr/local --with-openssl
    

    and it worked.

    0 讨论(0)
  • 2020-12-07 20:56

    That's what helped me:

    rvm reinstall 2.5
    
    brew tap raggi/ale
    brew install openssl-osx-ca
    brew services start openssl-osx-ca
    

    Found this solution here: https://github.com/raggi/openssl-osx-ca#readme

    0 讨论(0)
  • 2020-12-07 21:06

    macOS Catalina

    brew install rbenv/tap/openssl@1.0
    rvm reinstall 2.3.8 --with-openssl-dir=/usr/local/opt/openssl@1.0
    
    0 讨论(0)
提交回复
热议问题