I just built RHEL 6 and I need to be able to install ruby gems, etc. I have the ruby 1.8.7 packages installed but there is no gem command anywhere? What gives?
Asked
Active
Viewed 1.7k times
6
-
Have you tried `find / --name gem`? If it's a new system it shouldn't take too long to search. If that doesn't return any results it might not be installed, do a `yum list *gem*`, pick the most relevant result and install it. Not really a proper answer (Unless it works, in which case it was ^_^) – Smudge May 31 '11 at 16:32
2 Answers
15
You probably have to install RubyGems. Try:
yum install rubygems
If it fails, try installing it by hand:
wget http://rubyforge.org/frs/download.php/74922/rubygems-1.8.4.tgz
tar xzpvf rubygems-1.8.4.tgz
cd rubygems-1.8.4
ruby setup.rb
![](../../users/profiles/77249.webp)
Eduardo Ivanec
- 14,531
- 1
- 35
- 42
-
While this works, I think it would be more ideal to install via yum and a system configured repository, rather than installing one-off RPMs. – quickshiftin Sep 09 '13 at 19:39
-
[Updated link on rubygems.org](https://rubygems.org/pages/download). Also, note that to use yum you need your RH subscription to be up-to-date and that subscriptions don't seem to be backward compatible - meaning if your department upgrades then you must also upgrade as the older subscription expires. This also applies to using rvm. – wmorrison365 Apr 28 '16 at 08:07
0
Run the command below:
whereis gem
/usr/local/bin/gem
cp /usr/local/bin/gem /sbin
gem -v
2.5.1
-
1This question has already been resolved. Also, when formatting code, please use `code formatting` instead of **bold letters.** – David Makogon Jun 16 '16 at 14:12