Installation on other Linux distributions works similarly as on Ubuntu.

On Fedora, the dependencies can be installed as follows:

sudo dnf install ruby ruby-devel @development-tools

On Debian:

sudo apt-get install ruby-full build-essential

The rest works the same as on Ubuntu.