Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Ubuntu 10.10 here. On the command line, I'm trying to do:

gem install railsless-deploy

I get this message:

The program 'gem' can be found in the following packages: * rubygems1.8 * rubygems1.9.1 Try: sudo apt-get install

So I did: sudo apt-get install rubygems1.9.1

I then try the command again: gem install railsless-deploy

But the same quoted message appears again. Why? Any help to figure this out?

Thanks a lot.

share|improve this question
    
This question applies to Natty (11.04) as well. The accepted answer from @Mikel also applies to 11.04 –  Macho Matt Jul 5 '11 at 2:46

1 Answer 1

up vote 5 down vote accepted

rubygems1.9.1 is a virtual package that seems to only exist for backwards compatibility.

It installs ruby1.9.1.

ruby1.9.1 provides /usr/bin/gem1.9.1.

So, if you want Ruby 1.9.1, you should run gem1.9.1 instead of gem.

Or, if you want Ruby 1.8.x, you should run gem.

(In theory, you should be able to run update-alternatives --config gem to make /usr/bin/gem point to the 1.9.1 version, but this doesn't seem to work.)

share|improve this answer
    
Thanks a lot Mikel. I've used Ruby 1.8 package so that I can simply use gem. This is for Capistrano deployment so, no need to have the latest rail here. Thanks a lot. Really. :) –  MEM Mar 21 '11 at 21:42
    
After all, I end up installing a new ruby version, and done it "comme il faut". In order to see the sequence of commands used to achieve this, please see question section below: stackoverflow.com/questions/5395183/… –  MEM Mar 24 '11 at 11:53

Your Answer

 
discard

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.