尝试安装宝石美洲狮的第一步是在命令提示符下输入gem install puma --version 2.12.3。然后出现此错误。我不知道该怎么做。
C:\Users>gem install puma --version 2.12.3
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing puma:
ERROR: Failed to build gem native extension.
C:/Ruby22-x64/bin/ruby.exe -r ./siteconf20150809-8352-14jkju1.rb extconf.rb
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
--without-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:/Ruby22-x64/bin/$(RUBY_BASE_NAME)
--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:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/puma-2
.12.3 for inspection.
Results logged to C:/Ruby22-x64/lib/ruby/gems/2.2.0/extensions/x64-mingw32/2.2.0
/puma-2.12.3/gem_make.out
收到此消息后,我会按照https://github.com/hicknhack-software/rails-disco/wiki/Installing-puma-on-windows
这些说明操作我收到此错误:
C:\Users>gem install puma -- --with-opt- dir=c:\
openssl
ERROR: Loading command: install (LoadError)
127: The specified procedure could not be found. - C:/Ruby22-x64/lib/r
uby/2.2.0/x64-mingw32/openssl.so
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass
旁注:这是mkmf.log
请帮忙!谢谢!
答案 0 :(得分:1)
我想我找到了你的问题的答案。 Here the link
您必须下载OpenSSL
个库。有两种类型的OpenSSL库,一种用于32位,另一种用于64位。
安装后,运行gem install puma -- --with-opt-dir=D:\openssl
--with-opt-dir=D:\openssl
是您下载了libs的文件夹方向。
有些教程有openssl的链接,适用于32位计算机。几次失败后我才意识到这一点。然后我下载了64位版本。