Skip to content
Poignant Guide Ruby Q&A

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

Asked by Dmitri V. · Installing Ruby and setup1 replyupdated

Short answer

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:

Written by Dmitri V. ·
CitePoignant 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.
  1. Member ·
    $ 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?

    0
    ReplyLink

Plain text or simple Markdown. Links are nofollow. Your email is never shown.

  1. 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 --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.

Poignant Guide Ruby Q&A. Questions and answers on learning Ruby and programming: syntax, blocks, objects, gems, Rails, debugging and reading the Poignant Guide.