gpt4 book ai didi

ruby-on-rails - 错误 : RVM Ruby not used, 首先运行 `rvm use 1.9.1`

转载 作者:数据小太阳 更新时间:2023-10-29 08:17:28 29 4
gpt4 key购买 nike

我正在使用 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.

列出已知 ruby ,我得到以下 MRI ruby 。

$ 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 或执行其他先决条件才能启动服务器。我确信 bundle 已安装,但一些 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

时,我仍然遇到同样的错误

最佳答案

对于 Ruby 2.0.0它应该是 rvm use 2.0.0-p195 根据你的 rvm list 然后开始 bundle install..
有时还需要运行 /bin/bash --login

关于ruby-on-rails - 错误 : RVM Ruby not used, 首先运行 `rvm use 1.9.1`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18456773/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com