Ruby Version Manager is a command-line tool for installing & managing multiple Ruby interpreters and versions as well as gem sets simultaneously on the same computer. Installing RVM on Debian 11 bullseye or 10 buster will also help the users to get the latest version of Ruby instead of sticking to the one supplied through the Debian default repository.
Therefore, this Ruby Version Manager offers flexibility to developers working on various projects with different requirements.
Steps to install RVM on Debian 11 Bullseye
You just need a user with sudo rights to perform this tutorial and the steps given here can be used for Debian 10 Buster as well.
Run System update
Update the installed packages and refresh the repository cache using the update command. Also, along with that install the cURL tool.
sudo apt update sudo apt install curl
Add Ruby Version Manager GPG key
To let the system confirm the packages we get to install the RVM- Ruby Version Manager are from an authentic source, we will add the GPG key used to sign the RVM packages.
curl -sSL https://rvm.io/mpapis.asc | gpg --import - curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
Run RVM Installation script on Debian 11 Bullseye
Next, run the curl command to download and install the RVM using script from GitHub on your Debian 11 Linux.
curl -sSL https://get.rvm.io | bash -s stable
Reload Debian 11 or 10 Shell
After the installation, to let the system properly integrate the RVM home path to the system environment variable, either close the terminal app and open it again or simply reload the shell session using the given command:
source ~/.bashrc
Check available Ruby version to install
Now, we can use the RVM command to install and manage Ruby versions on our Debian Linux. Run this command to list what are the available versions:
rvm list known
Ruby Installation
Now, to install the latest version, run:
rvm install ruby
for some specific version, mention that:
rvm install 3.0
Note: if you get this error while installing Ruby:
please read /home/h2s/.rvm/log/1635778195/package_install_patch_g++_gcc_autoconf_automake _bison_libc6-dev_libffi-dev_libgdbm-dev_libncurses5-dev_libsqlite3-dev_libtool_libyaml-dev_ make_patch_sqlite3_zlib1g-dev_libgmp-dev_libreadline-dev_libssl-dev.log Requirements installation failed with status: 100.
Then perform the following things:
Edit source file:
sudo nano /etc/apt/sources.list
Paste the following repo at the end of the file.
deb http://deb.debian.org/debian sid main contrib non-free
Save it by pressing Ctrl+O, hit the Enter key, and exit it using Ctrl+X.
Run system update:
sudo apt update
Install following dependencies:
sudo apt install patch g++ gcc autoconf automake bison libc6-dev libffi-dev libgdbm-dev \ libncurses5-dev libsqlite3-dev libtool libyaml-dev make patch sqlite3 zlib1g-dev \ libgmp-dev libreadline-dev libssl-dev
Now, check if there are any other dependencies required by the RVM:
rvm requirements
Once that is done you will be able to install any version of Ruby on your Debian 11 Bullseye without any error.
• How to install Anaconda on Debian 10 or 11 Bullseye
• Install Node js & NPM on Debian 11 Bullseye
• Install Python 3. x or 2.7 on Debian 11 Bullseye Linux