Home HowTo switch to older ruby versions using DNF Modules
Post
Cancel

HowTo switch to older ruby versions using DNF Modules

The default ruby version that comes with Fedora, from fedora version 34 is Ruby version 3.x. This can cause issues if yoy are using projects or services that rely on older versions. For example at the time of writing github pages are relying on Ruby version 2.7

Fortunally it’s easy to downgrade ruby on Fedora and other DNF or YUM distros. To do this we use DNF module or YUM module.

First you have to reset Ruby

1
 $ sudo dnf module reset ruby

Then you can choose the Ruby version you like to install instead

1
sudo dnf module install ruby:2.7

If that dosen’t work then set the allowerasing flag

1
sudo dnf module install ruby:2.7 --allowerasing

Then you should sync all packages with distro-sync

1
sudo dnf distro-sync --allowerasing
This post is licensed under CC BY 4.0 by the author.