Gem command not found

I installed gem on Ubuntu 10.10 32 bit with

apt-get install gem -y 

But when I try to run

 gem install something.gem 

I get a command error that was not found.

 bash: gem: command not found 

I installed gem, is there any reason why it says it cannot find the command?

These files were installed using the gem package.

http://pastie.org/3483416

+75
linux ruby rubygems
Feb 28 '12 at 15:47
source share
13 answers

Do you want ruby ​​stones? If so, you need to install libgemplugin-ruby, and then the ruby ​​'gem' program will be in your path:

 aptitude install libgemplugin-ruby 
+51
Feb 29 2018-12-12T00:
source share

Try the following:

 sudo apt-get install rubygems 
+100
Dec 15 '13 at 11:06
source share

The following command installs ruby ​​gem for ubuntu:

 apt-get install libgemplugin-ruby 

I did this after the ruby ​​was installed.

+24
Nov 18 '12 at 8:55
source share

Installing this package allows you to use the gem command on Debian 8:

 apt-get install rubygems-integration 

To install the gem package, you may also need:

 apt-get install ruby ruby-dev 
+21
Oct 30 '15 at 9:00
source share

FWIW, the equivalent package for RHEL / Fedora / CentOS / etc and SuSE / OpenSuSE, is apparently called "rubygems".

+10
Jun 26 '13 at 20:22
source share

The following command can help you

sudo apt-get install ruby

+9
Sep 16 '15 at 7:40
source share

On CentOS 7, you can:

yum -y install rubygems-devel

It worked for me.

+6
Jul 25 '16 at 19:25
source share

On Debian, Ubuntu, or Linux Mint:

 $ sudo apt-get install rubygems ruby-dev 

On CentOS, Fedora, or RHEL:

 $ sudo yum install rubygems ruby-devel 
+4
Dec 23 '17 at 12:46 on
source share

On Ubuntu 14.04,

apt-get install ruby ruby-dev

this will install gem for you.

+4
Feb 27 '18 at 3:30
source share

I know this is a bit late for an answer. But I ran into this error and I found a solution here: https://rvm.io/integration/gnome-terminal

You just need to enable the "Run the command as a login shell" command in the terminal settings.

+3
Jan 01 '14 at 18:29
source share

verify that rvm is a type rvm | head -1 function type rvm | head -1 type rvm | head -1

+2
Nov 07 '13 at 14:26
source share

The following command will give you a list of files installed by the gem package:

 dpkg -L gem 

which will help you troubleshoot.

+1
Feb 28 2018-12-12T00:
source share

to try

$ /usr/bin/pd-gem

or

$ pd-gem

+1
Feb 29 2018-12-12T00:
source share



All Articles