I ran this command and it solved my problem.
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
Now I see recent versions of Ruby.
Answer from tim_xyz on Stack OverflowVideos
I ran this command and it solved my problem.
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
Now I see recent versions of Ruby.
The reason is rbenv uses ruby-build and your Ubuntu ships a relatively old ruby-build version. Even Ubuntu 24.04 ships this 2 year old release of ruby-build 20220426-1 which does not include the latest ruby versions.
You can upgrade your system ruby-build (but the packages seem a bit behind) or just like you did clone the git repo as a plugin into your rbenv directory: git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
However, you will need to keep your ruby-build clone up to date if you want to keep up with new ruby releases: git -C "$(rbenv root)"/plugins/ruby-build pull