在Windows上的Ruby on Rails中安装puma扩展时出错

时间:2014-08-12 09:36:26

标签: ruby-on-rails ruby gem puma

我试图在Ruby on Rails中安装puma扩展程序并收到此错误。

C:/RailsInstaller/Ruby1.9.3/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/Ruby1.9.3/include/ruby-1.9.1/ruby/intern.h:661: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/Ruby1.9.3/include/ruby-1.9.1/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

3 个答案:

答案 0 :(得分:2)

使用--with-opt-dir指定OpenSSL安装位置:

gem install puma -- --with-opt-dir=c:\openssl

我也是在MINGW32中尝试这个(就像git提供的linux utils一样),并且发现你必须在MINGW中使用正斜杠:

gem install puma -- --with-opt-dir=c:/openssl

答案 1 :(得分:0)

您可能没有安装或正确配置OpenSSL。

检查这些以获取更多信息。

Cannot install Puma gem on Ruby on Rails

还有Puma Github存储库的问题

https://github.com/puma/puma/issues/430

答案 2 :(得分:0)

gem install puma -- --with-cppflags=-I/usr/local/opt/openssl/include