Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何";使用OpenSSL支持重新编译Ruby“;使用RVM?_Ruby_Macos_Openssl_Rvm_Bundler - Fatal编程技术网

如何";使用OpenSSL支持重新编译Ruby“;使用RVM?

如何";使用OpenSSL支持重新编译Ruby“;使用RVM?,ruby,macos,openssl,rvm,bundler,Ruby,Macos,Openssl,Rvm,Bundler,在通过RVM安装Ruby 2.3.8之后,我在运行bundle时遇到以下错误: 您必须使用OpenSSL支持重新编译Ruby,或者更改文件中的源代码 如何使用OpenSSL支持重新编译Ruby?我的解决方案: 快跑 1:brew安装 2:rvm安装2.3——使用openssl lib=/usr/local/opt/openssl/lib——使用openssl include=/usr/local/opt/openssl/include (如果已安装rvm,请使用重新安装而不是安装。)用于MacO

在通过RVM安装Ruby 2.3.8之后,我在运行
bundle
时遇到以下错误:

您必须使用OpenSSL支持重新编译Ruby,或者更改文件中的源代码

如何使用OpenSSL支持重新编译Ruby?

我的解决方案:

快跑

1:brew安装

2:rvm安装2.3——使用openssl lib=/usr/local/opt/openssl/lib——使用openssl include=/usr/local/opt/openssl/include

(如果已安装rvm,请使用重新安装而不是安装。)

用于MacOS Mojave上的rvm 在我的例子中,安装程序失败是因为它在新版本的openssl中使用了过时的部分。这对我起了作用:

  • 转到“自制核心”文件夹并取回旧的openssl gem(1.0.2t)

  • 输入文件并将类“Openssl”重命名为“OpensslAT102t”

  • 使用brew安装它

    brew install openssl@1.0.2t
    
  • 安装后,强制rvm使用已安装的ssl版本

    # Install 2.3.8
    rvm install 2.3.8 --disable-binary --with-openssl-dir=`brew --prefix openssl@1.0.2t`
    # Or reinstall
    rvm reinstall 2.3.8 --disable-binary --with-openssl-dir=`brew --prefix openssl@1.0.2t`
    

  • 您是否尝试过按照错误消息的建议重新编译支持OpenSSL的Ruby?是的,我尝试了多种解决方案,甚至花了一天的时间来摆脱这种情况。但花了这么多时间后,我发现只有以下答案可以作为我的案例的解决方案。对不起,我没有看到您回答了自己的问题。这也可能有效:
    brew install openssl@1.0.2t
    
    # Install 2.3.8
    rvm install 2.3.8 --disable-binary --with-openssl-dir=`brew --prefix openssl@1.0.2t`
    # Or reinstall
    rvm reinstall 2.3.8 --disable-binary --with-openssl-dir=`brew --prefix openssl@1.0.2t`