【问题标题】:Getting Error while installing puma extension in Ruby on Rails on Windows在 Windows 上的 Ruby on Rails 中安装 puma 扩展时出错
【发布时间】:2014-10-05 07:47:38
【问题描述】:

我试图在 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

【问题讨论】:

    标签: ruby-on-rails ruby gem puma


    【解决方案1】:

    使用 --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
    

    【讨论】:

      【解决方案2】:

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

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

      Cannot install Puma gem on Ruby on Rails

      还有关于 Puma Github 存储库的问题

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

      【讨论】:

        【解决方案3】:
        gem install puma -- --with-cppflags=-I/usr/local/opt/openssl/include 
        

        【讨论】:

          猜你喜欢
          • 2012-09-02
          • 2019-03-01
          • 1970-01-01
          • 1970-01-01
          • 2013-12-16
          • 1970-01-01
          • 2012-06-11
          • 2012-12-11
          • 1970-01-01
          相关资源
          最近更新 更多