I want to install Ruby 3.1.2
using rbenv but for some indescribable reason I end up with the following error:
BUILD FAILED (macOS 12.4 using ruby-build 20220713)
Inspect or clean up the working tree at /var/folders/bw/rs138g1n5zv_qwn7_7kggc9r0000gq/T/ruby-build.20220719230321.35067.BRya3b
Results logged to /var/folders/bw/rs138g1n5zv_qwn7_7kggc9r0000gq/T/ruby-build.20220719230321.35067.log
Last 10 log lines:
The Ruby yaml extension was not compiled.
ERROR: Ruby install aborted due to missing extensions
Configure options used:
--prefix=/Users/some_user/.rbenv/versions/3.1.2
--with-openssl-dir=/Users/some_user/.rbenv/versions/3.1.2/openssl
--enable-shared
--with-readline-dir=/usr/local/opt/readline
CC=clang
LDFLAGS=-L/Users/some_user/.rbenv/versions/3.1.2/lib
CPPFLAGS=-I/Users/some_user/.rbenv/versions/3.1.2/include
What I tried so far was:
$ brew update
$ brew install ruby-build
$ brew install rbenv
$ rbenv install 3.1.2
And I ended up with the above error. I already tried to:
- reinstall rbenv
- re-install ruby-build
- install first ruby 3.1.0 (the same error)
and below:
RUBY_CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix openssl` --with-readline-dir=`brew --prefix readline` --with-libyaml-dir=`brew --prefix libyaml`" rbenv install 3.1.2
With the same result.
My rbenv version:
$ rbenv --version
rbenv 1.2.0
What I missed?