简体   繁体   English

RVM错误在Ubuntu上安装rubygems

[英]RVM error installing rubygems on Ubuntu

I have an ubuntu machine and I am trying to install rubygems using RVM by following this guide: 我有一台ubuntu机器,我正在按照以下指南尝试使用RVM安装rubygems:

When I run the command rvm rubygems current or even the command rvm rubygems latest I get the following error: 当我rvm rubygems current运行命令rvm rubygems current或什至rvm rubygems latest命令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

At first I thought the error was due to the --no-document flag, but after reading and trying this discussion on github , nothing changed. 起初,我认为错误是由于--no-document标志引起的,但是在github上阅读并尝试了此讨论后,没有任何改变。

I also checked this stackoverflow discussion but it doesn't seem to be applicable to my case because I have a fresh installation (no manually installed packages nor anything). 我也检查了这个stackoverflow的讨论,但是它似乎不适用于我的情况,因为我的安装是全新的(没有手动安装的软件包,也没有任何安装)。

Over all I tried using commands like rvm get head and rvm stable but nothing seems to work. 总的来说,我尝试使用诸如rvm get head命令rvm get headrvm stable但似乎没有任何效果。

What am I missing? 我想念什么? Could this be a permission's problem somehow? 莫非这是许可的问题?

EDIT: 编辑:

This is the result of rvm list : 这是rvm list的结果:

rvm rubies

   ruby-2.2.1 [ x86_64 ]

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

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

I had ruby installed, but turns out it was not set in rvm. 我安装了ruby,但事实证明它没有在rvm中设置。 To fix this first I tried using rvm use ruby --default , but I got the infamous "rvm is not a function" error. 为了解决这个问题,我首先尝试使用rvm use ruby --default ,但是我得到了臭名昭著的“ rvm不是一个函数”错误。

To fix this, first run bash --login and then then rvm use ruby --default . 要解决此问题,请先运行bash --login ,然后运行rvm use ruby --default

Once these steps are complete you can proceed with rubygems installation. 完成这些步骤后,即可继续进行rubygems安装。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM