找不到宝石指挥部

我已经在 Ubuntu 10.1032位安装了 gem

apt-get install gem -y

但当我试图逃跑的时候

gem install something.gem

我得到的错误命令没有被找到。

bash: gem: command not found

我安装了 gem,它为什么说找不到命令呢?

这些文件是通过 gem 包安装的

Http://pastie.org/3483416

163925 次浏览

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

dpkg -L gem

that should help you troubleshoot.

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

try

$ /usr/bin/pd-gem

or

$ pd-gem

The following command installs ruby gem for ubuntu:

apt-get install libgemplugin-ruby

I did it after ruby was installed.

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

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

Try the following:

sudo apt-get install rubygems

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.

The following command may help you

sudo apt-get install ruby

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

On CentOS 7 you can do:

yum -y install rubygems-devel

That worked for me.

On Debian, Ubuntu or Linux Mint:

$ sudo apt-get install rubygems ruby-dev

On CentOS, Fedora or RHEL:

$ sudo yum install rubygems ruby-devel

On Ubuntu 14.04,

apt-get install ruby ruby-dev

this will install gem for you.

I had the same problem. What I did was:

sudo apt-get update

And then reinstall ruby-full

sudo apt-get install ruby-full

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