3

I am not able to install ruby 2.1.2 on MacBook Pro (16-inch, 2019). I am getting below issue

 Downloading ruby-2.1.2.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.bz2
Installing ruby-2.1.2...

WARNING: ruby-2.1.2 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 (macOS 11.2.3 using ruby-build 20210309)

Inspect or clean up the working tree at /var/folders/m8/2rpyp98n6kn0f5628315l8jr0000gn/T/ruby-build.20210319190843.1296.BVeODj
Results logged to /var/folders/m8/2rpyp98n6kn0f5628315l8jr0000gn/T/ruby-build.20210319190843.1296.log

Last 10 log lines:
installing capi-docs:         /Users/shodhangk/.rbenv/versions/2.1.2/share/doc/ruby
The Ruby openssl extension was not compiled.
ERROR: Ruby install aborted due to missing extensions
Configure options used:
  --prefix=/Users/shodhangk/.rbenv/versions/2.1.2
  --with-openssl-dir=/usr/local/opt/openssl@1.1
  --with-readline-dir=/usr/local/opt/readline
  CC=clang
  LDFLAGS=-L/Users/shodhangk/.rbenv/versions/2.1.2/lib 
  CPPFLAGS=-I/Users/shodhangk/.rbenv/versions/2.1.2/include 

I looked at this Ruby installation (2.2.2) fails in macOS Big Sur and tried with all below solutions but still, the same issue exists.

RUBY_CONFIGURE_OPTS=--with-openssl-dir=/usr/local/Cellar/openssl@1.0/1.0.2t  rbenv install 2.1.2 

CFLAGS="-Wno-error=implicit-function-declaration" rbenv install 2.1.2

Even tried by slightly changing the ruby versions to 2.1.x and 2.2.x. But no difference.

sgk
  • 159
  • 1
  • 13

0 Answers0