ruby-install fails to install older versions of ruby for example 2.7.7 on an m1 mac pro
ruby-install ruby 2.7.7
...
11: from ./tool/rbinstall.rb:947:in `<main>'
10: from ./tool/rbinstall.rb:947:in `each'
9: from ./tool/rbinstall.rb:950:in `block in <main>'
8: from ./tool/rbinstall.rb:799:in `block in <main>'
7: from ./tool/rbinstall.rb:835:in `install_default_gem'
6: from ./tool/rbinstall.rb:835:in `each'
5: from ./tool/rbinstall.rb:845:in `block in install_default_gem'
4: from ./tool/rbinstall.rb:279:in `open_for_install'
3: from ./tool/rbinstall.rb:846:in `block (2 levels) in install_default_gem'
2: from /Users/m/src/ruby-2.7.7/lib/rubygems/specification.rb:2430:in `to_ruby'
1: from /Users/m/src/ruby-2.7.7/lib/rubygems/core_ext/kernel_require.rb:83:in `require'
/Users/m/src/ruby-2.7.7/lib/rubygems/core_ext/kernel_require.rb:83:in `require': cannot load such file -- openssl (LoadError)
make: *** [do-install-all] Error 1
!!! Installation of ruby 2.7.7 failed!
The issue is to do with the version of openssl. older versions of ruby does not support newer versions of openssl
to fix try the following
my other answer for a slightly different but related issue can be found : ruby-install fails when installing ruby 2.6.x and 3.0.x on mac osx 11.6