Linux 找不到宝石命令

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9485083/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 04:53:26  来源:igfitidea点击:

Gem Command not found

rubylinuxrubygems

提问by awmusic12635

I have installed gem on Ubuntu 10.10 32 bit with

我已经在 Ubuntu 10.10 32 位上安装了 gem

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?

我安装了 gem,有什么理由说它找不到命令吗?

These files were install by gem package

这些文件是由 gem 包安装的

http://pastie.org/3483416

http://pastie.org/3483416

采纳答案by 01100110

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

你想要红宝石吗?如果是这样,您需要安装 libgemplugin-ruby,然后 ruby​​ 'gem' 程序将在您的路径中:

aptitude install libgemplugin-ruby

回答by martinhans

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

以下命令将为您提供 gem 包安装的文件列表:

dpkg -L gem

that should help you troubleshoot.

这应该可以帮助您进行故障排除。

回答by perreal

try

尝试

$ /usr/bin/pd-gem

$ /usr/bin/pd-gem

or

或者

$ pd-gem

$ pd-gem

回答by Druvision

The following command installs ruby gem for ubuntu:

以下命令为 ubuntu 安装 ruby​​ gem:

apt-get install libgemplugin-ruby

I did it after ruby was installed.

我是在安装 ruby​​ 后做到的。

回答by David Arnold

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

FWIW,RHEL/Fedora/CentOS/etc 和 SuSE/OpenSuSE 的等效包似乎被称为“rubygems”。

回答by Connor Leech

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

检查 rvm 是一个函数 type rvm | head -1

回答by Thomas

Try the following:

请尝试以下操作:

sudo apt-get install rubygems

回答by castrike

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

我知道现在回复有点晚了。但我确实遇到了这个错误,我在这里找到了一个解决方案:https: //rvm.io/integration/gnome-terminal

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

您只需要在终端首选项下启用“以登录 shell 运行命令”。

回答by Akash Jain

The following command may help you

以下命令可能对您有所帮助

sudo apt-get install ruby

sudo apt-get 安装 ruby

回答by jsnHyman

Installing this package allows you to use gemcommand on Debian 8:

安装此软件包允许您gem在 Debian 8 上使用命令:

apt-get install rubygems-integration

To install a gem package you might also need:

要安装 gem 包,您可能还需要:

apt-get install ruby ruby-dev