mise defers to ruby-build underneath and the readme confirms it expects the development packages and headers to be self installed and verified. switch to mise settings ruby.compile=false
Reposting Kevin Fries', response with a small clarification as it worked for me.
For those that find this on a google search, install lib yaml with brew, then try your Mise ruby install again.
The command to run is brew install libyaml
This solution worked for me.
MacOS 14.5, MacBook Pro M1.
brew install rubybrew link --overwrite ruby --force- You will see a terminal warning:
Refusing to link macOS provided/shadowed software: ruby If you need to have ruby first in your PATH, run: echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.zshrc
For compilers to find ruby you may need to set: export LDFLAGS="-L/usr/local/opt/ruby/lib" export CPPFLAGS="-I/usr/local/opt/ruby/include"
For pkg-config to find ruby you may need to set: export PKG_CONFIG_PATH="/usr/local/opt/ruby/lib/pkgconfig"
- Paste in terminal:
echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.zshrc
If you are using zsh, you may need additional steps:
4.1. Configure environment variables for compilers:
echo 'export LDFLAGS="-L/usr/local/opt/ruby/lib"' >> ~/.zshrc
echo 'export CPPFLAGS="-I/usr/local/opt/ruby/include"' >> ~/.zshrc
4.2. Configure the environment variable for pkg-config:
echo 'export PKG_CONFIG_PATH="/usr/local/opt/ruby/lib/pkgconfig"' >> ~/.zshrc
Reload your terminal.
Check ruby version:
ruby -v
I hope you'll see output ruby 3.3.4 or newer.
Hope it helps!