So I am trying to install ruby 2.5.0 with rbenv and this is my issue:
$ rbenv install 2.5.0
ruby-build: use openssl from homebrew
Downloading ruby-2.5.0.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.0.tar.bz2
Installing ruby-2.5.0...
ruby-build: use readline from homebrew
BUILD FAILED (OS X 10.13.3 using ruby-build 20171226-3-g01e7b7b)
Inspect or clean up the working tree at /var/folders/6d/p9mv033d1xv9hc4xbdr7fxf40000gp/T/ruby-build.20180212121818.63339
Results logged to /var/folders/6d/p9mv033d1xv9hc4xbdr7fxf40000gp/T/ruby-build.20180212121818.63339.log
Last 10 log lines:
installing capi-docs:
/Users/lukeholloway/.rbenv/versions/2.5.0/share/doc/ruby
The Ruby OpenSSL extension was not compiled.
ERROR: Ruby install aborted due to missing extensions
Configure options used:
--prefix=/Users/lukeholloway/.rbenv/versions/2.5.0
--with-openssl-dir=/usr/local/opt/openssl
--with-readline-dir=/usr/local/opt/readline
CC=clang
LDFLAGS=-L/Users/lukeholloway/.rbenv/versions/2.5.0/lib
CPPFLAGS=-I/Users/lukeholloway/.rbenv/versions/2.5.0/include
The issue seems to be with paths between the mac version of OpenSSL and the Homebrew version. I use Homebrew on my mac for everything FYI.
So here is my openssl folder:
$ which openssl
/usr/local/opt/openssl/bin/openssl
$ openssl version
OpenSSL 1.0.2n 7 Dec 2017
I have this line in my .bash_profile
to make it use the newer version installed with Homebrew:
export PATH="/usr/local/opt/openssl/bin:$PATH"
It seems to be loading the correct OpenSSL version now but it still wont compile correctly. It does this with any version of ruby.
Does anyone know what is going on specifically? Any help would be great!