Thin and Puma Fail with Similar Issues - Error: Failed to Build Gem Native Extension on MAC with Openssl@1.1

Thin and Puma fail with similar issues - ERROR: Failed to build gem native extension on Mac with OpenSSL@1.1

The Puma team pointed me to a temporary solution for compiling puma.

gem install puma:4.3.5 -- --with-cflags="-Wno-error=implicit-function-declaration"

I used this variant for the latest version

gem install puma -- --with-cflags="-Wno-error=implicit-function-declaration"

I was also able to use this same technique to with thin, but I have not tested whether the gem works.

gem install thin -- --with-cflags="-Wno-error=implicit-function-declaration"

An error occurred while installing thin (1.7.2)

disabling the error fixed it:

bundle config build.thin --with-cflags="-Wno-error=implicit-function-declaration"

Bundle install results in: Gem::Ext::BuildError: ERROR: Failed to build gem native extension. ... make install failed, exit code 2

I figured out what I needed to do.

Referencing an answer on the json gem github, It seems running brew install coreutils solved all my issues revolving around this problem of mine.

gem eventmachine fatal error: 'openssl/ssl.h' file not found

$ gem install eventmachine -- --with-cppflags=-I/usr/local/opt/openssl/include                                                                                                             
Building native extensions with: '--with-cppflags=-I/usr/local/opt/openssl/include'
This could take a while...
Successfully installed eventmachine-1.0.8
1 gem installed

You can also set up bundler like this but I think that is superficial

bundle config build.eventmachine --with-cppflags=-I/usr/local/opt/openssl/include


Related Topics



Leave a reply



Submit