rbenv install fails with BUILD FAILED on macOS, what is missing?
New MacBook, fresh shell. I do this on Linux boxes all day, but rbenv on macOS is new to me. I installed rbenv with Homebrew, ran rbenv init, opened a new terminal, and then:
Cite
Poignant Guide Ruby Q&A, "rbenv install fails with BUILD FAILED on macOS, what is missing?", https://poignantguide.net/answers/read/rbenv-install-fails-with-build-failed-on-macos-what-is-missing/, accessed 2026-11-27.$ rbenv install 3.4.12 Downloading ruby-3.4.12.tar.gz... Installing ruby-3.4.12... ruby-build: using readline from homebrew BUILD FAILED (macOS 15.1 using ruby-build 20261105) Inspect or clean up the working tree at /var/folders/xx/T/ruby-build.20261111093012.4411.aB3xYz Results logged to /var/folders/xx/T/ruby-build.20261111093012.4411.log Last 10 log lines: ERROR: The Ruby openssl extension was not compiled. Missing the OpenSSL lib? Please refer to https://github.com/rbenv/ruby-build/wiki for solutions.I already tried it twice and reran with a different Ruby version (3.3.x), same failure.
brew doctorsays "Your system is ready to brew." I do not want to patch around it with a system-wide hack. What is actually missing, and where do I look when this happens again?
Write something first.
Give people something to work with: at least 30 words on what happened and what you tried.
That is too long. Keep it under 6,000 characters.
Write the question as the title, 15 to 140 characters, no links.
Pick a category.
Add a name (2 to 40 characters, no links).
That email address does not look right.
That was quick. Read the thread, then try again.
The form expired. Reload the page and post again.
Something went wrong with the form. Reload and try again.
Please complete the check and post again.
Limit reached for now. Try again later.
This thread is closed to new replies.
This thread no longer accepts replies.
Something went wrong with the form. Reload and try again.
Post a reply or question first (name and email), then this browser can vote, edit and accept answers.
You cannot vote on your own post.
Only the author (within 30 days) or the forum team can do that.
That email already has an account. Use your sign-in link instead.
New accounts are paused for the moment. Try again later.
That was already posted.
1 answer
- Sunita R.Member ·
I had the same wall on an M2 Mac last month. Coming from Python I assumed pyenv-style magic would just work. For me it was
xcode-select --installthat I had never run, because I installed Homebrew through a script that did not complain. Checkxcode-select -pfirst, it should print a path.