6

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?

1
  • 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 ^_^)
    – user80776
    May 31, 2011 at 16:32

2 Answers 2

14

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
2
  • 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. Sep 9, 2013 at 19:39
  • Updated link on rubygems.org. 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. Apr 28, 2016 at 8:07
0

Run the command below:

whereis gem

/usr/local/bin/gem

cp /usr/local/bin/gem /sbin

gem -v

2.5.1

1
  • 1
    This question has already been resolved. Also, when formatting code, please use code formatting instead of bold letters. Jun 16, 2016 at 14:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .