Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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
up vote 10 down vote accepted

You probably have to install RubyGems. Try:

yum install rubygems

If it fails, try installing it by hand:

tar xzpvf rubygems-1.8.4.tgz
cd rubygems-1.8.4
ruby setup.rb
share|improve this answer
This worked. Thank you! – NJ01 May 31 '11 at 17:41
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 9 '13 at 19:39
Updated link on 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 at 8:07

Run the command below:

whereis gem


cp /usr/local/bin/gem /sbin

gem -v


share|improve this answer
This question has already been resolved. Also, when formatting code, please use code formatting instead of bold letters. – David Makogon Jun 16 at 14:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.