在 Windows 上安装 Puma 错误 [英] Installing Puma on Windows error

查看:63
本文介绍了在 Windows 上安装 Puma 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试在 Windows 上安装 Puma 并收到此错误 -

Tried installing Puma on Windows and getting this error -

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

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

Tried several solutions to try and fix the problem, but they all somehow end up with this error.

我在我的电脑上安装了 Openssl 并用它来做一些 SSL 证书的事情,所以我肯定它安装正确.

I have Openssl installed on my computer and have used it to do some SSL certificate stuff, so I'm definitely sure it's installed properly.

有人可以帮忙吗?

推荐答案

给你一个你需要做的事情的总结:

To give you a summary of things you need to do:

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

Download OpenSSL package for x64-windows (since you're using x64 version of Ruby): http://packages.openknapsack.org/openssl/openssl-1.0.0k-x64-windows.tar.lzma Extract the package, as indicated in several RubyInstaller posts Proceed again with gem installation and point to the directory where you extracted OpenSSL

命令如下:

C:\>mkdir C:\MyDir\x64-windows
C:\>cd C:\MyDir\x64-windows
C:\MyDir\x64-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

这篇关于在 Windows 上安装 Puma 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆