You can install previous versions of Ruby following this instructions posted on this RVM github issue: rvm/rvm#4680 (comment)
I did the same as @grhansen suggested. I was installing ruby 2.3 and that required libssl1.0-dev. I am using Ubuntu 19.04. So I opened my /etc/apt/sources.list by
sudo nano /etc/apt/sources.list
.