# rbenv install fails with BUILD FAILED on macOS, what is missing?

Source: https://poignantguide.net/answers/read/rbenv-install-fails-with-build-failed-on-macos-what-is-missing/
Site: Poignant Guide Ruby Q&A, category Installing Ruby and setup
Published: 2026-11-27. Updated: 2026-11-27. Replies: 1.

## Question by Dmitri V., 2026-11-27

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:

```bash
$ 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 doctor` says "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?

## Reply 1 by Sunita R., 2026-11-27

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 --install` that I had never run, because I installed Homebrew through a script that did not complain. Check `xcode-select -p` first, it should print a path.

---
Cite as: 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.
