Can't Get "Gem" Command to Work - Why?

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

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

Chloe Bennett
Author

Chloe Bennett

Chloe Bennett explores the intersection of pop culture, streaming entertainment, digital trends, and contemporary lifestyle. Her weekly commentary reaches thousands of culture enthusiasts.