Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot install Puma gem on Ruby on Rails

Tags:

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

gem install puma 

I get this error message:

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 

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).

like image 729
EJ107 Avatar asked Nov 29 '13 22:11

EJ107


People also ask

What is gem native extension?

“Native extensions” are the glue that connects a Ruby gem with some other non-Ruby software component or library present on your machine.

What is GEM Puma?

Puma is a simple, fast, threaded, and highly parallel HTTP 1.1 server for Ruby/Rack applications. Puma is intended for use in both development and production environments. It's great for highly parallel Ruby implementations such as Rubinius and JRuby as well as as providing process worker support to support CRuby well.


1 Answers

Came across very same issue.

sudo apt-get install libssl-dev 

fixed it for me.

like image 76
Vitali Avatar answered Sep 21 '22 01:09

Vitali