⚠️ Warning: This will install an unstable version of Ruby with the latest changes.
apt update
apt install autoconf bison build-essential gcc git libedit-dev libffi-dev libgdbm-dev libqdbm-dev libreadline-dev libssl-dev make ruby zlib1g-dev
git clone --depth 1 https://github.com/ruby/ruby
cd ruby
autoconf
./configure
make
make install