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:
- Ubuntu 14.04 (Step 3)
- 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.
Want to contribute?
You could earn up to $300 by adding new articles
Suggest an update
Request an article