steel steel - 7 months ago 104
Ruby Question

Compiling Ruby error: Failed to configure openssl. It will not be installed

On OSX, after downloading the ruby repository latest commit from github and following the instructions to build, I run

make
but I get the error:

Failed to configure openssl. It will not be installed.


If I run
make check
, I get more information.

Skipping `gem cert` tests. openssl not found.
...
`<class:TestGemRemoteFetcher>': uninitialized constant TestGemRemoteFetcher::OpenSSL (NameError)


Clearly it cannot find openssl, but I have it installed via Brew. What am I missing?

There are many answers to this sort of question out there (this, for example), but I can't seem to make any of the solutions work.

Answer

Brew install openssl library as a keg-only. Try passing path to your openssl to your build script:

./configure --with-openssl-dir="$(brew --prefix openssl)"