Follow this article’s guidelines to install RubyGems on the Debian system.
Install RubyGems on Debian
The Debian users can install RubyGems via
Method 1: Install RubyGems on Debian Via Source Repository
You can find RubyGems installation inside the Debian source repository, making it easy for the user to install it on Debian from the apt command. However, before installing RubyGems from the Debian repository, you must update the repository from the following command:
Then, install RubyGems from the Debian repository using the following command:
To confirm the RubyGems installation on Debian, run the below-given command:
Method 2: Install RubyGems on Debian from tgz Source File
The above method won’t be able to install the updated RubyGems version on Debian system. Thus, if you want to install and update the RubyGems version on the Debian system, follow the below-given steps:
Step 1: First, you must ensure Ruby is installed on Debian and if not, you can run the below-given command to install it.
Note: If you run the above command, it also installs the RubyGems on Debian, but it won’t be the updated version.
Step 2: If you want to download the latest version RubyGems on Debian, grab the latest version tgz source file, and download it on the terminal.
Step 3: After downloading the tgz source, you can extract it in the Debian home directory from the following command:
Step 4: Open RubyGems source directory using the following command:
Step 5: After that, run the setup.rb file using Ruby to install the latest version of RubyGems on the Debian system.
Step 6: To confirm the latest version of Ruby is installed on Debian, use the following command:
The Debian users can install RubyGems on the system from the source Debian repository through the “apt” command. However, the users won’t be able to install the latest version through this method. Installing the latest version of RubyGems on Debian is possible if users follow the second method from the tgz source file and the installation steps are already provided in the above-mentioned guidelines.