Learn How To Install RubyGems on Linux
Table of Contents
RubyGems is a package manager for Ruby. A package manager organizes packages during development of an application. In this doc, you will learn how to install RubyGems on Linux. I have included instructions for both Ubuntu and CentOS.
Prerequisites
Ruby must have already been installed. If you need to install Ruby, see the following guides:
https://www.itweb.services/tutorials/linux-guides/installing-ruby-on-rails-on-ubuntu-14-04″>Ubuntu 14.04 (Step 3)
https://www.itweb.services/tutorials/linux-guides/install-ruby-on-rails-with-rbenv-on-centos-7″>CentOS 7 (Step 3)
Ubuntu
You will need wget
to download RubyGems, install it if you haven’t already:
apt-get install wget
Next, we can download RubyGems using wget
:
wget http://production.cf.rubygems.org/rubygems/rubygems-1.5.0.tgz
We can now untar RubyGems:
tar xvf rubygems*
We can now install RubyGems using Ruby:
ruby setup.rb
You can now use the RubyGems commands. For a full list, please refer to the official website.
CentOS
If you do not have wget
installed yet, install it:
yum install wget
After installation of wget
, we can download RubyGems:
wget http://production.cf.rubygems.org/rubygems/rubygems-1.5.0.tgz
Next, we have to untar RubyGems:
tar xvf rubygems*
Enter its directory:
cd rubygems-1.5.0
We can now install RubyGems using Ruby:
ruby setup.rb
You can now use the RubyGems commands. For a full list, please refer to the official website.
Need help?
Do you need help setting up this on your own service?
Please contact us and we’ll provide you the best possible quote!