Skip to content

Instantly share code, notes, and snippets.

@lunohodov
Created March 5, 2023 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lunohodov/84b1fce56a0e213f9397d152ad0e720f to your computer and use it in GitHub Desktop.
Save lunohodov/84b1fce56a0e213f9397d152ad0e720f to your computer and use it in GitHub Desktop.
Latest Ruby (3.2.1) on Apple Silicone
  • Apple Silicone machine (M2, Ventura 13.2.1)
  • Homebrew-installed asdf-vm

Installing latest Ruby via asdf or ruby-build failed with errors:

~ % asdf install ruby latest
To follow progress, use 'tail -f /var/folders/gy/rg1mbc9x6l52qwswzr5gbcjr0000gn/T/ruby-build.20230305121529.66351.log' or pass --verbose
Downloading ruby-3.2.1.tar.gz...
-> https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.1.tar.gz
Installing ruby-3.2.1...
ruby-build: using readline from homebrew
ruby-build: using gmp from homebrew

BUILD FAILED (macOS 13.2.1 using ruby-build 20230222)

Inspect or clean up the working tree at /var/folders/gy/rg1mbc9x6l52qwswzr5gbcjr0000gn/T/ruby-build.20230305121529.66351.kzJU8V
Results logged to /var/folders/gy/rg1mbc9x6l52qwswzr5gbcjr0000gn/T/ruby-build.20230305121529.66351.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/gy/rg1mbc9x6l52qwswzr5gbcjr0000gn/T/ruby-build.20230305121529.66351.kzJU8V/ruby-3.2.1/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

Running

~ % brew reinstall libyaml
~ % gem install psych -- --with-libyaml-dir=$(brew --prefix libyaml)
~ % export RUBY_CONFIGURE_OPTS=--with-libyaml-dir=$(brew --prefix libyaml)
~ % asdf install ruby latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment