简体   繁体   English

Ubuntu新更新后rvm的Ruby安装问题

[英]Ruby Installation issues with rvm after Ubuntu New updates

I am on the way to install rails. 我正在安装滑轨。 I am using Ubuntu 12.04 LLTS 我正在使用Ubuntu 12.04 LLTS

vipin@vipin-Satellite-C640:~$ uname -a vipin @ vipin-Satellite-C640:〜$ uname -a
Linux 3.11.0-18-generic #32~precise1-Ubuntu SMP Thu Feb 20 17:54:21 UTC 2014 i686 i686 i386 GNU/Linux Linux 3.11.0-18-generic#32〜precise1-Ubuntu SMP 2月20日星期四17:54:21 UTC 2014 i686 i686 i386 GNU / Linux

First I followed this . 首先,我遵循了这一点

but when i tried 但是当我尝试

rails -v 导轨-v

The program 'ruby' can be found in the following packages:
 * ruby1.8
 * ruby1.9.1
Try: sudo apt-get install <selected package>  

I reinstall ruby by 我通过重新安装Ruby

vipin@vipin-Satellite-C640:~$ rvm reinstall 2.1.0 vipin @ vipin-Satellite-C640:〜$ rvm重新安装2.1.0

Now I tried 现在我尝试

ruby -v 红宝石-v

again same result 同样的结果

vipin@vipin-Satellite-C640:~$ ruby -v
The program 'ruby' can be found in the following packages:
 * ruby1.8
 * ruby1.9.1
Try: sudo apt-get install <selected package>

I tried to uninstall rvm 我试图卸载rvm

vipin@vipin-Satellite-C640:~$ sudo apt-get --purge remove ruby-rvm
[sudo] password for vipin: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package ruby-rvm is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

UPDATE : I was able to successfully created apps with rails in Ubuntu. 更新:我能够在Ubuntu中成功创建带有Rails的应用程序。 Now I updated and upgraded the Kernel. 现在,我更新并升级了内核。

You have broken version of RVM. 您的RVM版本已损坏。 Ubuntu does something to RVM that produces lots of errors, the only safe way of fixing for now is to: Ubuntu对RVM会产生很多错误,目前修复的唯一安全方法是:

sudo apt-get --purge remove ruby-rvm
sudo rm -rf /usr/share/ruby-rvm /etc/rvmrc /etc/profile.d/rvm.sh

open new terminal and validate environment is clean from old RVM settings (should be no output): 打开新的终端并验证环境是否与旧的RVM设置保持清洁(应该没有输出):

env | grep rvm

if there was output, try to open new terminal, if it does not help then restart your computer. 如果有输出,请尝试打开新的终端,如果这样做没有帮助,请重新启动计算机。

install RVM : 安装RVM

\curl -L https://get.rvm.io | 
  bash -s stable --ruby --autolibs=enable --auto-dotfiles

If you find you need some hand-holding, take a look at Installing Ruby on Ubuntu 12.04 , which gives a bit more explanation. 如果您发现需要一些帮助,请看一下在Ubuntu 12.04安装Ruby ,它提供了更多解释。

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

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