程序“gem"可以在以下软件包中找到 [英] The program 'gem' can be found in the following packages

查看:45
本文介绍了程序“gem"可以在以下软件包中找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 Virtual Box/Ubuntu 13.10 上安装 Ruby on Rails.以下是步骤

I'm installing Ruby on Rails on Virtual Box/Ubuntu 13.10. Below are the steps

  1. ruby -v

  1. ruby -v

=> 程序 'ruby' 可以在以下软件包中找到...试试:sudo apt-get install

=> The program 'ruby' can be found in the following packages ... Try: sudo apt-get install

来源/我的帐户/...

source /my account/...

==> 好的.

\curl -L https://get.rvm.io |猛击

\curl -L https://get.rvm.io | bash

=> 我收到一条感谢我使用 RVM 的消息.如有问题,我应该咨询他们的网站或推特.

=> I've got a message thanking me for using RVM. In case of problems, I should consult their website or twitter.

rvm 要求

==> 要求安装成功.

==> Requirments installation successful.

输入 rvm |头 -n 1

type rvm | head -n 1

==> rvm 是一个函数

==> rvm is a function

rvm 列表已知

==> 我得到一份 ruby​​ 版本列表

==> I get a list of ruby's versions

rvm install 2.0.0 -C --enable-shared, --with-openssl-dir=/usr/local

rvm install 2.0.0 -C --enable-shared, --with-openssl-dir=/usr/local

==> ruby​​ 2.0.0 安装完成.请考虑升级到 ruby​​ 2.1.0 ...

==> Install of ruby 2.0.0 complete. Please consider upgrading to ruby 2.1.0 ...

rvm 列表

==> rvm 红宝石=* ruby​​-2.0.0-p353 [i686]

==> rvm rubies =* ruby-2.0.0-p353 [i686 ]

<代码># =>- 当前

# =* - 当前 &&默认

# * - 当前

rvm 使用 2.0.0@railstutorial_rails_4_0 --create --default

rvm use 2.0.0@railstutorial_rails_4_0 --create --default

==> 好的.

rvm gemset 列表

rvm gemset list

==> ruby​​-2.0.0-p353 的 gemsets ...

==> gemsets for ruby-2.0.0-p353 ...

(默认)

全球

=> railstutorial_rails_4_0

=> railstutorial_rails_4_0

gem -v

=> 'gem' 程序可以在以下软件包中找到:

=> The program 'gem' can be found in the following packages:

  • ruby1.9.1
  • 红宝石尝试:sudo apt-get install

为什么我需要再次安装 ruby​​?我以为我在步骤 7 中这样做了.我一遍又一遍地重复相同的步骤,但我不明白为什么它一直告诉我再次安装 ruby​​.

Why do I need to install ruby again? I thought I did so in step 7. I've gone over and over the same steps but I don't understand why it keeps telling me to install ruby again.

感谢您的帮助

推荐答案

在您的终端窗口中,转到编辑">配置文件首选项">标题和命令",然后选中将命令作为登录外壳运行"框.重新启动您的终端并立即尝试 ruby​​ -v 和 gem -v.版本应该出现.如果没有,请尝试重新安装它们.

On your Terminal window go to Edit>Profile Preferences>Title and command, and check the box that says "Run command as a login shell". Restart your Terminal and try ruby -v and gem -v now. The versions should come up. If they don't then try re-installing them.

这篇关于程序“gem"可以在以下软件包中找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆