5

I'm running Ubuntu 11.10 and installed Ruby 1.9 like this:

$ sudo apt-get install ruby1.9 rubygems

Everything is working very well but ri seems to have empty documentations. ri told me that the documentations were empty and I had to install them. I executed this because I read it would help:

$ rdoc --all --ri

Now, when I try to open any documentations:

$ ri Array
Nothing known about Array

I get the same for everything else I search.

js-coder
  • 8,134
  • 9
  • 42
  • 59

5 Answers5

8

what about this ?

apt-get install ri1.8

EDIT

or try this: (non rvm)

gem install rdoc rdoc-data
rdoc-data --install
Said Kaldybaev
  • 9,380
  • 8
  • 36
  • 53
  • Thanks, the first one worked. But now I got the docs for 1.8 right? I tried installing ri1.9 before but it said it was already installed. What does rvm mean? – js-coder Apr 02 '12 at 17:43
  • RVM - Ruby version manager, helps to handle different versions of Ruby in your machine – Said Kaldybaev Apr 02 '12 at 17:58
  • 1
    mann, move to the RVM, here'a tutor from Ryan Bigg: http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/ – Said Kaldybaev Apr 02 '12 at 17:59
1

You are probably using ri1.8 by default. Try running 'ri1.9.1', as you would run ruby1.9.1 when needing that specific version. Using 'update-alternatives' you should be able to set 1.9.1 as default (somehow).

1

this works for me

sudo apt-get install ri

Davious
  • 1,833
  • 2
  • 15
  • 16
1

"install ri" installs 1.8 (on Ubuntu 12.04 at least). Use

sudo apt-get install ri1.9
Yaron
  • 11
  • 1
0

The documentations do not come immediately with Ruby installations, even up to 1.9.3. An effective shortcut to installing Ruby Documentation is to use the code:

sudo apt-get install ri

No need to specify which version as terminal will capture the documentation from the latest Ruby information, and this should work as long as you have the latest Ruby version installed on Ubuntu.