【问题标题】:Puma installation error on windowsWindows上的Puma安装错误
【发布时间】:2015-02-08 06:46:49
【问题描述】:

我正在尝试在 Windows 机器上安装 puma gem。我收到以下错误。浏览了几个论坛,但都是徒劳的。

C:/railsInstaller/Ruby2.0.0/bin/ruby.exe extconf.rb 
creating Makefile

make
generating puma_http11-i386-mingw32.def
compiling http11_parser.c
ext/http11/http11_parser.rl: In function 'puma_parser_execute':
ext/http11/http11_parser.rl:111:3: warning: comparison between signed and unsigned integer expressions
compiling io_buffer.c
io_buffer.c: In function 'buf_to_str':
io_buffer.c:119:3: warning: pointer targets in passing argument 1 of 'rb_str_new' differ in signedness
c:/RailsInstaller/Ruby2.0.0/include/ruby-2.0.0/ruby/intern.h:668:7: note: expected 'const char *' but argument is of type 'uint8_t *'
compiling mini_ssl.c
In file included from mini_ssl.c:3:0:
c:/RailsInstaller/Ruby2.0.0/include/ruby-2.0.0/ruby/backward/rubyio.h:2:2: warning: #warning use "ruby/io.h" instead of "rubyio.h"
mini_ssl.c:4:25: fatal error: openssl/bio.h: No such file or directory
compilation terminated.
make: *** [mini_ssl.o] Error 1

我已尝试安装 https://github.com/puma/puma/issues/202 中提到的 openSSL Headers 包和库,但链接不起作用。

【问题讨论】:

标签: ruby-on-rails gem openssl puma


【解决方案1】:

我在bundle install 之前运行了bundle update,这为我解决了这个问题。

我不确定这是否是唯一有帮助的,因为在此之前我使用以下步骤手动更新了 puma:

  1. 通过运行ruby -v -ropenssl -e "puts OpenSSL::OPENSSL_VERSION"检查使用哪个版本的openssl Ruby
  2. 从下载正确的 openssl 版本 http://packages.openknapsack.org/openssl/openssl-1.0.0o-x86-windows.tar.lzma (从https://github.com/hicknhack-software/rails-disco/wiki/Installing-puma-on-windows 获取链接并根据#1 的输出对其进行编辑)。
  3. 使用 http://www.7-zip.org 将 openssl 提取到 C:\RailsInstaller\openssl
  4. gem install puma -- --with-opt-dir=C:/RailsInstaller/openssl

【讨论】:

  • 很高兴您发现这有帮助!
  • 你也拯救了我的一天。谢谢!!
  • 我的荣幸!很高兴它对您有所帮助。
  • 难以置信!直到现在我还以为 puma 不支持 Windows。感谢您的写作。
猜你喜欢
  • 2015-07-24
  • 2015-11-01
  • 1970-01-01
  • 2019-03-01
  • 2017-07-29
  • 2014-10-05
  • 2012-11-27
  • 2014-07-28
  • 1970-01-01
相关资源
最近更新 更多