简体   繁体   English

使用RVM安装Ruby时出现问题

[英]Problem when installing Ruby using RVM

I am having a hard time trying to reinstall Ruby (1.9.2-p136) on my ubuntu machine, using RVM. 我很难使用RVM在我的ubuntu机器上重新安装Ruby(1.9.2-p136)。

Basically I just do: 基本上我只是这样做:

rvm install 1.9.2-p136

And during the Compiling step, it fails with the following error message: 并且在编译步骤中,它失败并显示以下错误消息:

(NoMethodError) undefined method `set_encoding' for RDoc::Parser:Class (NoMethodError)RDoc :: Parser:Class的未定义方法`set_encoding'

I tried to look for this on Stackoverflow and Google but it didn't help! 我试图在Stackoverflow和Google上寻找它,但没有帮助!

Any idea? 任何想法?

Thanks! 谢谢!

EDIT: To be clear, I am not using Ubuntu but Linux Mint 9 which is based on Ubuntu 10.04. 编辑:明确地说,我没有使用Ubuntu,而是基于Ubuntu 10.04的Linux Mint 9。

Well, oddly enough, RDoc was rev'd last week to a new version. 好吧,奇怪的是,RDoc上周被修订为新版本。 So, I suspect you're running into a snag with it, maybe Ruby 1.9.2-p136, and maybe RVM. 因此,我怀疑您正在遇到麻烦,也许是Ruby 1.9.2-p136,也许是RVM。

I'd recommend contacting the author of RVM; 我建议联系RVM的作者。 You can email him at the address that appears when you do rvm -v . 您可以在执行rvm -v时显示的地址给他发送电子邮件。 Include the output of rvm info . 包括rvm info的输出。

I'll do an install to a VM on my machine here and see how it goes. 我将在这里安装到计算机上的VM,然后看看它如何进行。 I have the same Ruby version, but it's been in place since it came out, so when RDoc updated there was an existing Ruby. 我有相同的Ruby版本,但是它自发布以来就已经存在,因此在RDoc更新时,已有一个Ruby。 I have the most recent Mint, which I assume is 9, based on Ubuntu 10 I think it said. 我有最新的Mint,我认为是基于Ubuntu 10,我认为是9。


EDIT: 编辑:

I just built a Mint 10 VM, then installed rvm, then installed 1.8.7-p330 and 1.9.2-p136. 我刚刚构建了一个Mint 10 VM,然后安装了rvm,然后安装了1.8.7-p330和1.9.2-p136。 Neither had any problems. 都没有任何问题。

One thing I didn't do, that Wayne Seguin told me is important, is to rvm notes after installing it, before installing Ruby. Wayne Seguin告诉我的一件事很重要,那就是在安装Ruby之后再安装rvm notes That will display any OS-specific things needed. 这将显示所需的任何特定于操作系统的内容。 For instance, on Mint 10 it says: 例如,在Mint 10上说:

dependencies: 依赖项:

For RVM 对于RVM

rvm: bash curl git rvm:bash卷曲git

For Ruby (MRI & ree) you should install the following OS dependencies: 对于Ruby(MRI和ree),您应该安装以下OS依赖项:

ruby: /usr/bin/aptitude install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev 红宝石:/ usr / bin / aptitude install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev


EDIT: 编辑:

An additional thing you might run into is a zlib warning when installing gems, which is handled on the RVM site in Zlib 您可能会遇到的另一件事是在安装gem时出现zlib警告,该警告在Zlib中的RVM站点上处理

I don't know what your problem is, but I've had to install rails to a couple of ubuntu machines and it was a nightmare compiling everything. 我不知道您的问题是什么,但是我不得不在几台ubuntu机器上安装滑轨,这是编译所有内容的噩梦。 I recently found: 我最近发现:

http://thechangelog.com/post/2857400260/railsready-setup-script-to-get-ruby-and-rails-running http://thechangelog.com/post/2857400260/railsready-setup-script-to-get-ruby-and-rails-running

This is the only way I would install rails in ubuntu. 这是我在ubuntu中安装滑轨的唯一方法。

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

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