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.
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
I tried to look for this on Stackoverflow and Google but it didn't help!
Any idea?
Thanks!
开发者_如何学编程EDIT: To be clear, I am not using Ubuntu but Linux Mint 9 which is based on Ubuntu 10.04.
Well, oddly enough, RDoc was rev'd last week to a new version. So, I suspect you're running into a snag with it, maybe Ruby 1.9.2-p136, and maybe RVM.
I'd recommend contacting the author of RVM; You can email him at the address that appears when you do rvm -v
. Include the output of rvm info
.
I'll do an install to a VM on my machine here and see how it goes. 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. I have the most recent Mint, which I assume is 9, based on Ubuntu 10 I think it said.
EDIT:
I just built a Mint 10 VM, then installed rvm, then installed 1.8.7-p330 and 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. That will display any OS-specific things needed. For instance, on Mint 10 it says:
dependencies:
For RVM
rvm: bash curl git
For Ruby (MRI & ree) you should install the following OS dependencies:
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
EDIT:
An additional thing you might run into is a zlib warning when installing gems, which is handled on the RVM site in Zlib
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. I recently found:
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.
精彩评论