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

前端 未结 12 1778
庸人自扰
庸人自扰 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 21:14

    On macOS 10.14, Ruby 2.5.3, and OpenSSL 1.0.2n this worked for me:

    ./configure --with-openssl --with-openssl-dir=/usr/local/ssl
    

    but I was only trying what the error messages were telling me:

    *** Following extensions are not compiled:
    openssl:
        Could not be configured. It will not be installed.
        /Users/brian/Desktop/Ruby/ruby-2.5.3/ext/openssl/extconf.rb:97: OpenSSL library could not be found. You might want to use --with-openssl-dir= option to specify the prefix where OpenSSL is installed.
        Check ext/openssl/mkmf.log for more details.
    *** Fix the problems, then remove these directories and try again if you want.
    make[1]: *** [note] Error 1
    

提交回复
热议问题