无法在 Ruby on Rails 上安装 Puma gem [英] Cannot install Puma gem on Ruby on Rails

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

问题描述

我正在尝试安装 puma gem,但是当我运行时

I'm trying to install the puma gem, but when I run

gem install puma

我收到此错误消息:

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:/Ruby193/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:/Ruby193/include/ruby-1.9.1/ruby/intern.h:653: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:/Ruby193/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             

Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/puma-2.6.0 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/puma-2.6.0/ext/puma_http11/gem_make.out

gem 'puma' 添加到我的 Gemfile 并运行 bundle install 不是一个选项,因为这不适用于任何 gem 并给我一个错误消息(这是一个单独的问题,我通过通过 gem install 安装它们而使用我使用的其他 gem 规避了这个问题).

Adding gem 'puma' to my Gemfile and running bundle install isn't an option, because that just doesn't work with any gem and gives me an error message (which is a separate issue, one that I've circumvented with the other gems I've used by installing them via gem install).

推荐答案

遇到了同样的问题.

sudo apt-get install libssl-dev

帮我修好了.

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

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