All original content is created in Ukrainian. Not all content has been translated yet. Some posts may only be available in Ukrainian.Learn more

Fix for the issue of installing Ruby 3.4.3 (and not only) via RVM on macOS (Apple Silicon)

Post cover: Fix for the issue of installing Ruby 3.4.3 (and not only) via RVM on macOS (Apple Silicon)
Table of contentsClick link to navigate to the desired location
This content has been automatically translated from Ukrainian.
During the installation of Ruby 3.4.3 via RVM on macOS (ARM / Apple Silicon), you may encounter the following error:
rvm install "ruby-3.4.3"
ruby-3.4.3 - #removing src/ruby-3.4.3 - please wait
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/26.2/arm64/ruby-3.4.3.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Installing requirements for osx.
Updating system - please wait
Installing required packages: pkg-config - please wait
Certificates bundle '/opt/homebrew/etc/[email protected]/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/username/.rvm/rubies/ruby-3.4.3, this may take a while depending on your cpu(s)...
ruby-3.4.3 - #downloading ruby-3.4.3, this may take a while depending on your connection...
ruby-3.4.3 - #extracting ruby-3.4.3 to /Users/username/.rvm/src/ruby-3.4.3 - please wait
ruby-3.4.3 - #configuring - please wait
ruby-3.4.3 - #post-configuration - please wait
ruby-3.4.3 - #compiling - please wait
Error running '__rvm_make -j10',
please read /Users/username/.rvm/log/1767089315_ruby-3.4.3/make.log
There has been an error while running make. Halting the installation.
The logs from make will look like this:
+__rvm_make:0> make -j10
file2lastrev.rb: does not seem to be under a vcs: .
        BASERUBY = /Users/username/.rvm/rubies/ruby-3.4.4/bin/ruby --disable=gems
        CC = gcc
        LD = ld
        LDSHARED = gcc -dynamiclib
        CFLAGS = -O3 -I/opt/homebrew/opt/libyaml/include -I/opt/homebrew/opt/libksba/include -I/opt/homebrew/opt/readli$
        XCFLAGS = -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -I. -I.ext/include$
        CPPFLAGS = -I/opt/homebrew/opt/node@22/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D$
        DLDFLAGS = -L/opt/homebrew/opt/libyaml/lib -L/opt/homebrew/opt/libksba/lib -L/opt/homebrew/opt/readline/lib -L/$
        SOLIBS = -ldl -lobjc -lpthread
        LANG = C.UTF-8
        LC_ALL =
        LC_CTYPE = UTF-8
        MFLAGS = - --jobserver-fds=3,4 -j
        RUSTC = no
        YJIT_RUSTC_ARGS = --crate-name=yjit --crate-type=staticlib --edition=2021 -g -C lto=thin -C opt-level=3 -C over$
Apple clang version 17.0.0 (clang-1700.6.3.2)
Target: arm64-apple-darwin25.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
compiling ./main.c
compiling dmydln.c
compiling miniinit.c
translating probes probes.d
RVM cannot find a pre-built binary for this OS version and is attempting to compile Ruby from source, but the compilation fails.

Reason

Ruby 3.4.x requires OpenSSL 3, but by default, RVM:
  • either pulls in OpenSSL 1.1
  • or does not pass the path to OpenSSL at all
This causes make to fail with an error.

Solution

You need to explicitly specify the path to OpenSSL 3, installed via Homebrew.
Make sure OpenSSL 3 is installed:
brew install openssl@3
Install Ruby with the explicit parameter:
rvm install ruby-3.4.3 --with-openssl-dir=$(brew --prefix)/opt/openssl@3
After this, Ruby will successfully:
  • compile
  • install
  • create gemsets
  • become available for use 

Useful to know

  • The message No binary rubies available - is not an error, it merely means that RVM has switched to source compilation mode
  • Ruby 3.4.x on macOS ARM currently often requires manual configuration
  • A similar issue may occur with other version managers
If Ruby 3.4.x cannot be installed via RVM on macOS - explicitly linking openssl@3 almost always helps.

This post doesn't have any additions from the author yet.

What is Middleware in Ruby on Rails and when is it used
04 Nov 10:39

What is Middleware in Ruby on Rails and when is it used

Нотатки про Ruby та RoR
Нотатки про Ruby та RoR@kovbaska
What is the Vanilla Rails approach?
14 Nov 16:48

What is the Vanilla Rails approach?

Нотатки про Ruby та RoR
Нотатки про Ruby та RoR@kovbaska
What is Elasticsearch and how does it work?
22 Nov 12:35

What is Elasticsearch and how does it work?

Нотатки про Ruby та RoR
Нотатки про Ruby та RoR@kovbaska
What is a time-series database?
22 Nov 12:42

What is a time-series database?

Нотатки про Ruby та RoR
Нотатки про Ruby та RoR@kovbaska
22 Nov 12:49

What is VACUUM in PostgreSQL?

Нотатки про Ruby та RoR
Нотатки про Ruby та RoR@kovbaska
What is a B-Tree (Balanced Tree)?
22 Nov 12:58

What is a B-Tree (Balanced Tree)?

Нотатки про Ruby та RoR
Нотатки про Ruby та RoR@kovbaska