【发布时间】:2013-08-27 04:08:33
【问题描述】:
我使用的是 Ubuntu 12.04 并使用 rvm 安装了 ruby。我最近将 ruby 从 1.9.3 升级到了 2.0.0。当我显示 ruby 版本时,它显示 2.0.0。
$ ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]
当我尝试启动 solr 服务器时,它说缺少一个包。
$ RAILS_ENV=development rake sunspot:solr:start
Could not find unicode_utils-1.4.0 in any of the sources
Run `bundle install` to install missing gems.
然后当我尝试bundle install 时,我收到以下错误。
$ bundle install
ERROR: RVM Ruby not used, run `rvm use 1.9.1` first.
列出已知的红宝石,我正在获取以下 MRI 红宝石。
$ rvm list known
# MRI Rubies
[ruby-]1.8.6[-p420]
[ruby-]1.8.7[-p374]
[ruby-]1.9.1[-p431]
[ruby-]1.9.2[-p320]
[ruby-]1.9.3[-p448]
[ruby-]2.0.0-p195
[ruby-]2.0.0[-p247]
[ruby-]2.0.0-head
ruby-head
正如我之前所说,我最近将 ruby 更新到 2.0.0 并删除了所有其他的。之后,每次我重新启动计算机时,我都需要执行bundle install 或执行其他先决条件来启动服务器。我确定捆绑包已安装,但某些 rvm ruby 版本是原因。任何帮助将不胜感激。
编辑1:我试过rvm use 2.0.0-p247,下面是我得到的输出。
$ rvm use 2.0.0-p247
RVM is not a function, selecting rubies with 'rvm use ...' will not work.
You need to change your terminal emulator preferences to allow login shell.
Sometimes it is required to use `/bin/bash --login` as the command.
Please visit https://rvm.io/integration/gnome-terminal/ for a example.
当bundle install
【问题讨论】:
-
@RajarshiDas : 我试过了,请看编辑 1
-
对不起忽略我的第一个它应该是
rvm use 2.0.0-p195按照rvm list然后开始bundle install..请让我知道 -
@RajarshiDas 我设置了
Run command as login shell,一切正常。谢谢你给我指路。
标签: ruby-on-rails ruby ubuntu rvm