Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

puma gem - Failed to build gem native extension

Tags:

puma

I was getting the following error while installing puma gem

     $ gem install puma     Fetching: puma-2.11.2.gem (100%)     Building native extensions.  This could take a while...     ERROR:  Error installing puma:     ERROR: Failed to build gem native extension.      ruby extconf.rb     checking for BIO_read() in -lcrypto... no     checking for BIO_read() in -llibeay32... no     *** extconf.rb failed *** 
like image 656
Amod Pandey Avatar asked May 09 '15 17:05

Amod Pandey


2 Answers

Try the following

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

You can also specify the gem version, like the following:

gem install puma -v '2.11.3' -- --with-cppflags=-I/usr/local/opt/openssl/include 
like image 71
Zack Xu Avatar answered Oct 02 '22 15:10

Zack Xu


I'm on OS X 10.12.4 and the comment @mahi added worked for me:

gem install puma -v '3.6.0' -- --with-opt-dir=/usr/local/opt/openssl 
like image 41
Beartech Avatar answered Oct 02 '22 14:10

Beartech