Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

So I used these commands:

sudo apt-get install ruby 1.9.3
cd /etc/alternatives
sudo ln -sf /usr/bin/ruby1.9.3 ruby

from in order to get ruby 1.9.3 and make it the default. That appears to have worked fine.

Now when I attempt to use gem install it tells me the gems are already the latest. However, when I attempt to run a script it tells me it can't find the gem I require on the first line. Long story short, this script didn't work in ruby 1.8.7 due to an error farther down in the code but did get past the require lines without issue.

So I expected to and assume I need to reinstall all my 1.8.7 gems for 1.9.3 or at least figure out how to point 1.9.3 at the gems I've installed.

How do I do get usable gems for 1.9.3?

share|improve this question

Do you also have ruby1.8 and rubygems installed? Uninstall them, or at least rubygems ("sudo apt-get remove rubygems"). Ubuntu 12.04's ruby1.9.3 package includes a version of rubygems, no additional package needed.

share|improve this answer
Thanks for the response. At this point I've gone to RVM though and everything seems to work well enough using it. If someone tests this and says it works, I'll mark it as the answer. I just don't have the time to mess with it and risk it breaking things that are working. Thanks again. – gabe Aug 6 '14 at 23: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.