awmusic12635
awmusic12635

Reputation: 1251

Gem Command not found

I have 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 the error of the command not being found.

bash: gem: command not found

I installed gem, is there any reason it is saying it can't find the command?

These files were install by gem package

http://pastie.org/3483416

Upvotes: 97

Views: 181972

Answers (15)

Thomas C.
Thomas C.

Reputation: 1

On Centos 8:

eventually, download the file of the application:

wget https://rubygems.org/downloads/asciidoctor-2.0.16.gem

then execute:

yum install -y rubygems ruby-devel
gem install asciidoctor

More: I tried positively also in a container (using the appropriate RUN and COPY statements before the commands).

Upvotes: 0

I had the same problem. What I did was:

sudo apt-get update

And then reinstall ruby-full

sudo apt-get install ruby-full

Upvotes: 6

Yushan
Yushan

Reputation: 633

On Ubuntu 14.04,

apt-get install ruby ruby-dev

this will install gem for you.

Upvotes: 8

Yash Vekaria
Yash Vekaria

Reputation: 2373

On Debian, Ubuntu or Linux Mint:

$ sudo apt-get install rubygems ruby-dev

On CentOS, Fedora or RHEL:

$ sudo yum install rubygems ruby-devel

Upvotes: 16

jsnjack
jsnjack

Reputation: 2889

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

apt-get install rubygems-integration

To install a gem package you might also need:

apt-get install ruby ruby-dev

Upvotes: 22

thedude
thedude

Reputation: 627

On CentOS 7 you can do:

yum -y install rubygems-devel

That worked for me.

Upvotes: 6

Akash Jain
Akash Jain

Reputation: 1052

The following command may help you

sudo apt-get install ruby

Upvotes: 9

castrike
castrike

Reputation: 31

I know this is kind of late for a response. But I did run into this error and I found a solution here: https://rvm.io/integration/gnome-terminal

You just have to enable 'Run command as login shell' under the terminal preferences.

Upvotes: 3

Thomas
Thomas

Reputation: 1441

Try the following:

sudo apt-get install rubygems

Upvotes: 144

Connor Leech
Connor Leech

Reputation: 18873

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

Upvotes: 3

David Arnold
David Arnold

Reputation: 455

FWIW, the equivalent package for RHEL/Fedora/CentOS/etc and SuSE/OpenSuSE appears to be called 'rubygems'.

Upvotes: 10

Druvision
Druvision

Reputation: 1511

The following command installs ruby gem for ubuntu:

apt-get install libgemplugin-ruby

I did it after ruby was installed.

Upvotes: 23

01100110
01100110

Reputation: 2354

Are you wanting ruby gems? If so, you need to install libgemplugin-ruby and then the ruby 'gem' program will be in your path:

aptitude install libgemplugin-ruby

Upvotes: 52

perreal
perreal

Reputation: 98118

try

$ /usr/bin/pd-gem

or

$ pd-gem

Upvotes: 1

martinhans
martinhans

Reputation: 1213

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

dpkg -L gem

that should help you troubleshoot.

Upvotes: 1

Related Questions