Can't get "gem" command to work - Why?

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.

1

1 Answer

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.)

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like