【问题标题】:Ruby Installation issues with rvm after Ubuntu New updatesUbuntu 新更新后 rvm 的 Ruby 安装问题
【发布时间】:2014-02-28 16:48:55
【问题描述】:

我正在安装导轨。我正在使用 Ubuntu 12.04 LLTS

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

首先我关注了this

但是当我尝试时

导轨-v

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

我重新安装了 ruby​​

vipin@vipin-Satellite-C640:~$ rvm reinstall 2.1.0

现在我试过了

红宝石-v

同样的结果

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>

我试图卸载 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.

更新: 我能够在 Ubuntu 中使用 rails 成功创建应用程序。现在我更新和升级了内核。

【问题讨论】:

  • 你有什么问题?
  • rvm list 产生了什么

标签: ruby-on-rails ruby ruby-on-rails-3 ubuntu


【解决方案1】:

您的 RVM 版本已损坏。 Ubuntu 对 RVM 做了一些会产生很多错误的事情,目前唯一安全的修复方法是:

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

打开新终端并验证环境是否从旧的 RVM 设置中清除(应该没有输出):

env | grep rvm

如果有输出,请尝试打开新终端,如果没有帮助则重新启动计算机。

install RVM:

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

如果您发现需要一些帮助,请查看Installing Ruby on Ubuntu 12.04,它提供了更多解释。

【讨论】:

  • sudo apt-get --purge remove ruby-rvm 用于删除整个内容。 sudo rm -rf /usr/share/ruby-rvm /etc/rvmrc /etc/profile.d/rvm.sh 用于删除所有剩余文件,然后根据我提供的点赞重新安装。 blog.coolaj86.com/articles/installing-ruby-on-ubuntu-12-04.html
  • 我收到了这个~$ 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.
  • 没有问题的人继续执行我的回答中给出的其余说明
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多