Cannot install Puma gem on Ruby on Rails
Came across very same issue.
sudo apt-get install libssl-dev
fixed it for me.
I ran bundle update
before bundle install
and that solved the issue for me.
I'm not sure if that was the only thing that helped, as I manually updated puma before that, using these steps:
- Checked which version of openssl Ruby is using by running
ruby -v -ropenssl -e "puts OpenSSL::OPENSSL_VERSION"
- Downloaded the right openssl version fromhttp://packages.openknapsack.org/openssl/openssl-1.0.0o-x86-windows.tar.lzma(got the link from https://github.com/hicknhack-software/rails-disco/wiki/Installing-puma-on-windows and edited it based on the output of #1).
- Extracted openssl using http://www.7-zip.org to C:\RailsInstaller\openssl
gem install puma -- --with-opt-dir=C:/RailsInstaller/openssl
Figured out the solution to the puma bundle. Followed directions from https://github.com/hicknhack-software/rails-disco/wiki/Installing-puma-on-windows
First you need to download:
- DevKit compatible with your ruby version
- OpenSSL Developer Package (contains header files and binaries)
And then:
- Install DevKit, e.g. in
c:\devkit
- Unpack the OpenSSL Package, e.g. in
c:\openssl
(use 7Zip or PeaZip) - You need to copy the ddls from the bin directory (
libeay32.dll
andssleay32.dll
) to your ruby/bin directory. - Open a windows console
- Initialize the DevKit build environment:
c:\devkit\devkitvars.bat
(except here, I used this in command prompt instead:ruby dk.rb init
)
Now it’s possible to install the puma gem with the OpenSSL packages:
gem install puma -- --with-opt-dir=c:\openssl