Cannot install Puma gem on Ruby on Rails

落花浮王杯 提交于 2019-11-27 21:56:31

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:

  1. Checked which version of openssl Ruby is using by running ruby -v -ropenssl -e "puts OpenSSL::OPENSSL_VERSION"
  2. Downloaded the right openssl version from http://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).
  3. Extracted openssl using http://www.7-zip.org to C:\RailsInstaller\openssl
  4. gem install puma -- --with-opt-dir=C:/RailsInstaller/openssl
Michael Maddocks

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 and ssleay32.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

I think you hit issue #430 https://github.com/puma/puma/issues/430

Re-installing Ruby might help you as well as it closed this issue on GitHub.

I am using Windows 8 and couldn't get this work in development mode. Surely, it worked on production mode when I deployed to Heroku. Have you tried in production mode?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!