【问题标题】:RVM error installing rubygems on Ubuntu在 Ubuntu 上安装 ruby​​gems 的 RVM 错误
【发布时间】:2015-07-22 22:13:13
【问题描述】:

我有一台 ubuntu 机器,我正在尝试按照本指南使用 RVM 安装 ruby​​gems:

当我运行命令 rvm rubygems current 甚至命令 rvm rubygems latest 时,我收到以下错误:

fl4m3ph03n1x: ~ $ rvm rubygems current
system - #downloading rubygems-2.4.8
system - #extracting rubygems-2.4.8.....
system - #removing old rubygems.........
$LANG was empty, setting up LANG=en_US.utf8, if it fails again try setting LANG to something sane and try again.
system - #installing rubygems-2.4.8.
Error running 'env GEM_HOME=/home/fl4m3ph03n1x/.rvm/gems/system@global GEM_PATH= /home/fl4m3ph03n1x/.rvm/rubies/system/bin/ruby -d /home/fl4m3ph03n1x/.rvm/src/rubygems-2.4.8/setup.rb --no-document',
showing last 15 lines of /home/fl4m3ph03n1x/.rvm/log/1437602750_system/rubygems.install.log
[2015-07-22 22:05:50] /home/fl4m3ph03n1x/.rvm/rubies/system/bin/ruby
current path: /home/fl4m3ph03n1x/.rvm/src/rubygems-2.4.8
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/fl4m3ph03n1x/.rvm/bin
command(7): env GEM_HOME=/home/fl4m3ph03n1x/.rvm/gems/system@global GEM_PATH= /home/fl4m3ph03n1x/.rvm/rubies/system/bin/ruby -d /home/fl4m3ph03n1x/.rvm/src/rubygems-2.4.8/setup.rb --no-document
env: /home/fl4m3ph03n1x/.rvm/rubies/system/bin/ruby: No such file or directory

起初我以为错误是由--no-document 标志引起的,但在阅读并尝试this discussion on github 之后,没有任何改变。

我也检查了这个stackoverflow discussion,但它似乎不适用于我的情况,因为我有一个全新的安装(没有手动安装的软件包也没有任何东西)。

总的来说,我尝试使用 rvm get headrvm stable 等命令,但似乎没有任何效果。

我错过了什么?这可能是某种权限的问题吗?

编辑:

这是rvm list的结果:

rvm rubies

   ruby-2.2.1 [ x86_64 ]

# Default ruby not set. Try 'rvm alias create default <ruby>'.

# => - current
# =* - current && default
#  * - default

【问题讨论】:

  • 您似乎没有安装 ruby​​,rvm 列表显示什么?
  • 编辑问题以满足您的要求

标签: ruby-on-rails ruby ubuntu rubygems rvm


【解决方案1】:

我安装了 ruby​​,但结果发现它没有在 rvm 中设置。 为了解决这个问题,我首先尝试使用rvm use ruby --default,但我得到了臭名昭著的“rvm is not a function”错误。

要解决此问题,请先运行 bash --login,然后运行 ​​rvm use ruby --default

完成这些步骤后,您可以继续安装 ruby​​gems。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-11-17
    • 1970-01-01
    • 2012-02-22
    相关资源
    最近更新 更多