Fedora 34 now ships with Ruby 3.0 by default, which might be great news for Ruby developers. However, for those who might still be relying on older version of Ruby to run their stuff (eg: me), and don’t want to spend time updating things to make them work with Ruby 3.0 (like this Jekyll-based blog), the switch may be undesirable.
Good news, since Fedora 28, there is a lesser known feature of Fedora (and CentOS/RHEL), called DNF Modules, which came out of the Fedora Modularity initiative. DNF Modules allows you to configure your Fedora installation to track a specific version of upstream component (eg: Ruby27, PostgreSQL 10, etc) and would only receive updates and packages that are compatible with that version.
To switch to Ruby2.7, you can easily do it through following commands
$ sudo dnf module reset ruby $ sudo dnf module install ruby:2.7 $ sudo dnf --allowerasing distro-sync
After the update, you will see that your default ruby installation is now using Ruby 2.7.
For more information on DNF Modules, check out Switching Module Streams documentation at Fedora Documentation site.