加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – 在Windows上安装Puma错误

发布时间:2020-12-16 20:53:12 所属栏目:百科 来源:网络整理
导读:尝试在Windows上安装Puma并收到此错误 – Temporarily enhancing PATH to include DevKit...Building native extensions with: '--with-opt-dir=c:openssl'This could take a while...ERROR: Error installing puma: ERROR: Failed to build gem native ext
尝试在Windows上安装Puma并收到此错误 –
Temporarily enhancing PATH to include DevKit...
Building native extensions with: '--with-opt-dir=c:openssl'
This could take a while...
ERROR:  Error installing puma:
        ERROR: Failed to build gem native extension.

    C:/RailsInstaller/Ruby2.1.0/bin/ruby.exe extconf.rb --with-opt-dir=c:openssl
checking for BIO_read() in -lcrypto... no
checking for BIO_read() in -llibeay32... 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.

Provided configuration options:
    --with-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=C:/RailsInstaller/Ruby2.1.0/bin/ruby
    --with-puma_http11-dir
    --without-puma_http11-dir
    --with-puma_http11-include
    --without-puma_http11-include=${puma_http11-dir}/include
    --with-puma_http11-lib
    --without-puma_http11-lib=${puma_http11-dir}/lib
    --with-cryptolib
    --without-cryptolib
    --with-libeay32lib
    --without-libeay32lib

extconf failed,exit code 1

Gem files will remain installed in C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1
.0/gems/puma-2.11.2 for inspection.
Results logged to C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/extensions/x86
-mingw32/2.1.0/puma-2.11.2/gem_make.out

尝试了几个解决方案来尝试解决问题,但他们都以某种方式结束了这个错误.

我在我的计算机上安装了Openssl并使用它来做一些SSL证书的东西,所以我肯定确定它已正确安装.

有人能帮忙吗?

解决方法

为了总结您需要做的事情:

下载适用于x64-windows的OpenSSL软件包(因为您使用的是x64版本的Ruby):http://packages.openknapsack.org/openssl/openssl-1.0.0k-x64-windows.tar.lzma
解压缩包,如几个RubyInstaller帖子中所示
继续使用gem安装并指向您解压缩OpenSSL的目录

命令将是这样的:

C:&;mkdir C:MyDirx64-windows
C:&;cd C:MyDirx64-windows
C:MyDirx64-windows>bsdtar --lzma -xf openssl-1.0.0k-x64-windows.tar.lzma
C:&;gem install puma --platform=ruby -- --with-opt-dir=C:/MyDir/x64-windows

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读