技術

Apple silicon の Mac で ruby ≦ 2.4.0 を動かしたい

背景はどうあれ、M1, M2, M3, M4 chip のMacでとても古いRubyを動かしたいことだってある

brew install zlib
brew tap-new $(whoami)/openssl@1.1
curl https://raw.githubusercontent.com/Homebrew/homebrew-core/df0c4994aa4b2d61a86d38f4b954e8315dc4678c/Formula/o/openssl@1.1.rb -o /opt/homebrew/Library/Taps/$(whoami)/homebrew-openssl@1.1/Formula/openssl@1.1.rb
brew install $(whoami)/openssl@1.1/openssl@1.1
OPTFLAGS="-Wno-error=implicit-function-declaration" RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1) --with-zlib-dir=$(brew --prefix zlib)" arch -x86_64 rbenv install 2.1.6
rbenv rehash

-技術