Running into a problem installing Ruby on your Amazon Linux 2 machine?
I was able to successfully install Ruby and also rvm by doing the following:
sudo yum install gcc
gpg2 --keyserver hkp://pgp.mit.edu --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
rvm get head
rvm list known
# Install from one of the Ruby versions from the list.
rvm install 3.0.2