在Windows上安装gem openssl时出错

时间:2019-01-30 13:33:48

标签: ruby-on-rails ruby openssl rubygems

我正在尝试在Windows上安装openssl gem,但出现以下错误:

ERROR:  Error installing openssl:
    ERROR: Failed to build gem native extension.

current directory: 

C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/openssl-2.1.2/ext/openssl
C:/RailsInstaller/Ruby2.3.3/bin/ruby.exe -r ./siteconf20190130-612-n5x9sx.rb extconf.rb --with-openssl-dir=C:\Program Files\OpenSSL-Win64\lib
checking for t_open() in -lnsl... no
checking for socket() in -lsocket... no
checking for main() in -lws2_32... yes
checking for main() in -lgdi32... yes
checking for main() in -lcrypt32... yes
checking for openssl/ssl.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

我尝试了不同的方法和设置,但没有成功。我已经安装了openssl库,并且在输入

openssl version

在CMD中,我明白了

OpenSSL 1.1.1a  20 Nov 2018

我的红宝石版本是

ruby 2.3.3p222 (2016-11-21 revision 56859) [i386-mingw32]

我的rails版本是

Rails 5.1.6

感谢您的帮助和建议。

0 个答案:

没有答案