asdf-ruby: Failed to install ruby 3.2.2 on M2 Pro with macOS Ventura 13.3
Install ruby 3.2.2 with asdf install ruby 3.2.2
failed with following logs
To follow progress, use 'tail -f /var/folders/dc/48z1w1s10zd696901ff70qmw0000gn/T/ruby-build.20230410235200.45419.log' or pass --verbose
Downloading ruby-3.2.2.tar.gz...
-> https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.2.tar.gz
Installing ruby-3.2.2...
BUILD FAILED (macOS 13.3 using ruby-build 20230330)
Inspect or clean up the working tree at /var/folders/dc/48z1w1s10zd696901ff70qmw0000gn/T/ruby-build.20230410235200.45419.RMKe2o
Results logged to /var/folders/dc/48z1w1s10zd696901ff70qmw0000gn/T/ruby-build.20230410235200.45419.log
Last 10 log lines:
Check ext/psych/mkmf.log for more details.
*** Fix the problems, then remove these directories and try again if you want.
Generating RDoc documentation
/private/var/folders/dc/48z1w1s10zd696901ff70qmw0000gn/T/ruby-build.20230410235200.45419.RMKe2o/ruby-3.2.2/lib/yaml.rb:3: warning: It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
uh-oh! RDoc had a problem:
cannot load such file -- psych
run with --debug for full backtrace
make: *** [rdoc] Error 1
I tried this answer https://github.com/asdf-vm/asdf-ruby/issues/328#issuecomment-1433127845 but not working.
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 1
- Comments: 20
@theblang that’s unrelated, it just means your ruby-build is not to date yet. Run
asdf plugin update ruby
to fix that.@uxgnod I had the same issue (M1, macOS 13.3.1).
I was able to resolve by installing
libyaml
from homebrew (brew install libyaml
) and then installing normally (asdf install ruby latest
). I ultimately did not need to set any of the custom build options suggested in https://github.com/asdf-vm/asdf-ruby/issues/328#issuecomment-1433127845.What works for me:
ruby 3 versions
ASDF_RUBY_BUILD_VERSION=master asdf install ruby 3.2.2
ruby older versions
brew uninstall --ignore-dependencies openssl@3
ASDF_RUBY_BUILD_VERSION=master asdf install ruby 2.7.5
You can also use the newer-than-latest-release of ruby-build with (from README):
@pletoss The fix for many people is simply to use the latest build of ruby-build, which is done with:
No need to do anything with libyaml there.
@pboling Sorry I forgot to reply and update the status of this issue earlier. The way you mentioned can indeed solve the problem, and I agree that the issue has been resolved and I will close this.
@pboling , sorry only saw your comment after I fixed it. Your tip was indeed correct. Many thanks!
@uxgnod and @xcolour I had a similar issue with build and psych (Intel MBP 2019, macOS 13.4) and was able to resolve it by installing
libyaml
via homebrew (brew install libyaml
) and then installed normally (asdf install ruby 3.2.2
).Same as you @xcolour, I did not need any of the custom build options.
@etewiah It sounds like the command
asdf plugin update ruby
is failing for you. You’ll have to make sure that works first. Alternatively, you can try running the command: