Failed to install Ruby version 2.3.8 on mac - ERROR: Ruby install aborted due to missing extensions

Viewed 489

I am trying to install ruby 2.3.8 into my mac and for some reason it is failing. I used below 3 commands and all are failing:

RUBY_CONFIGURE_OPTS=--with-openssl-dir=/usr/local/Cellar/openssl/1.0.2t ruby-build 2.3.8 ~/.runtimes/Ruby23x
rbenv install 2.3.8 
ruby-build 2.3.8 ~/.runtimes/Ruby23x

with below error:

Downloading ruby-2.3.8.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.8.tar.bz2
Installing ruby-2.3.8...

WARNING: ruby-2.3.8 is past its end of life and is now unsupported.
It no longer receives bug fixes or critical security updates.

ruby-build: using readline from homebrew

BUILD FAILED (Mac OS X 10.14.6 using ruby-build 20200819)

Inspect or clean up the working tree at /var/folders/2_/m7qt44h94f32r5b8ty2dhklh9_hyz8/T/ruby-build.20200820170656.96889.WKDFd5
Results logged to /var/folders/2_/m7qt44h94f32r5b8ty2dhklh9_hyz8/T/ruby-build.20200820170656.96889.log

Last 10 log lines:
To eliminate this warning, please install libyaml and reinstall your ruby.
The Ruby yaml extension was not compiled.
ERROR: Ruby install aborted due to missing extensions
Configure options used:
  --prefix=/Users/dinebhat/.runtimes/Ruby23x
  --with-openssl-dir=/Users/dinebhat/.runtimes/Ruby23x/openssl
  --with-readline-dir=/usr/local/opt/readline
  CC=clang
  LDFLAGS=-L/Users/dinebhat/.runtimes/Ruby23x/lib -L/usr/local/opt/openssl@1.0/lib
  CPPFLAGS=-I/Users/dinebhat/.runtimes/Ruby23x/include -I/usr/local/opt/openssl@1.0/include

Do you trying multiple things, I guess I have messed it up even more. Installed ruby, openssl, rbenv multiple times but nothing seems to work. Here are the current specs of my system, any help is immensely appreciated:

38f9d3570ad8:~ dinebhat$ ruby -version
ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]
Ignoring RedCloth-4.3.2 because its extensions are not built.  Try: gem pristine RedCloth --version 4.3.2
Ignoring bluecloth-2.2.0 because its extensions are not built.  Try: gem pristine bluecloth --version 2.2.0
Ignoring byebug-11.0.1 because its extensions are not built.  Try: gem pristine byebug --version 11.0.1
Ignoring childprocess-1.0.1 because its extensions are not built.  Try: gem pristine childprocess --version 1.0.1
Ignoring curb-0.9.10 because its extensions are not built.  Try: gem pristine curb --version 0.9.10
-e:1:in `<main>': undefined local variable or method `rsion' for main:Object (NameError)
38f9d3570ad8:~ dinebhat$ 
38f9d3570ad8:~ dinebhat$ which ruby
/usr/local/opt/ruby/bin/ruby
38f9d3570ad8:~ dinebhat$ whereis ruby
/usr/bin/ruby
38f9d3570ad8:~ dinebhat$ 
38f9d3570ad8:~ dinebhat$ rbenv versions
* system (set by /Users/dinebhat/.rbenv/version)
38f9d3570ad8:~ dinebhat$ 
38f9d3570ad8:~ dinebhat$ which openssl
/usr/local/opt/openssl@1.0.2t/bin/openssl

Thanks in advance.

0 Answers
Related