Method 1: Install Ruby from Debian Repositories
- First, refresh the packages list with: sudo apt update.
- Install the ruby-full package by running the following command: sudo apt install ruby-full.
- Once the installation is completed, you can verify that it was successful by printing the Ruby version: ruby --version.