I just tried installing Ruby 2.7.1 on fresh Ubuntu 20.04 install using rbenv. The only packages I needed to successfully download and build ruby are included in the following command:
$ sudo apt install gcc make curl libssl-dev zlib1g-dev
If you want more complete build environment as suggested in ruby-build wiki you can run:
$ sudo apt install autoconf bison build-essential libssl-dev libyaml-dev libreadline-dev zlib1g-dev libncurses-dev libffi-dev libgdbm-dev
I modified some package names to work with Ubuntu 20.04.