- Right-click Terminal from the Application/Utility folder, Get Info, tick the “Open using Rosetta” box.
- Uninstall Homebrew
1) /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
2) rm -rf /opt/homebrew/*
3) sudo rm -rf /opt/homebrew
- Reinstall Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Restart terminal
- Check Homebrew is working fine:
brew doctor
- Reinstall openssl:
brew install openssl
- Install Ruby:
rvm install 2.5.3
Or any version
Solution for: Ruby 1.8.7 Mac OS Bigsur __rvm_make -j8′
Solution for: Cannot install ruby-2.2.7 on Mac OS X Big Sur – Error running ‘__rvm_make -j12’
Solution for: ruby-2.6.6 – #compiling – please wait Error running ‘__rvm_make -j8’
Solution for: Unable to install any ruby version through rvm on Monterey M1 Mac