RubyGems is a package management application for Ruby that is used to quickly and easily distribute Ruby/Rails applications and libraries. If you are planning on doing any development in Ruby, this is a must have. RubyGems is for Ruby as apt-get and yum are to Linux operating systems. This article will show you various ways to install it depending on what Linux distribution you are using.
Installing RubyGems Using apt-get on Ubuntu
sudo apt-get install rubygems
Installing RubyGems Using yum
sudo yum install rubygems
Manual Installation Method
wget http://production.cf.rubygems.org/rubygems/rubygems-1.5.0.tgz
tar xvf rubygems-1.5.0.tgz
cd rubygems-1.5.0
sudo ruby setup.rb
That’s all there is to it! You can begin install gems by using the gem install command
yum : No package rubygems available.
Tyler: What OS and version are you running?
Centos 5.7
Tyler,
Have you tried the ‘Manual Installation’ method listed above?
I tried the yum on RHEL6 no go
I tried the manual installation and I get
rubygems-2.0.3]# ruby setup.rb
RubyGems 2.0.3 installed
ERROR: While executing gem … (Gem::DocumentError)
RDoc is not installed: no such file to load — rdoc/rdoc
rubygems-2.0.3]# ls
Thanks it worked fine for me on ubuntu.
FWIW, I get the same behavior as Tyler on RHEL 6.
undefined method `map’ for Gem::Specification:Class (NoMethodError)
on ubuntu
undefined method `map’ for Gem::Specification:Class (NoMethodError)
in ubuntu 14.04
RubyGems 2.5.1 installed
ERROR: While executing gem … (NameError)
uninitialized constant Gem::SourceIndex
Did you mean? Gem::Source