Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

177 lines (113 sloc) 2.371 kB

Setting up core RI documentation for your version of Ruby

All versions, general procedure

  • Compile and install Ruby without ri/rdoc documentation.
  • Install the latest rdoc gem before you install any other gems.
  • Generate RI documentation using the latest rdoc gem.
  • Test if RI documentation is installed correctly.

RVM

2.1.0

Install and select the new Ruby:

$ rvm install 2.1.0
$ rvm 2.1.0

Generate RI documentation (takes a while):

$ cd ~/.rvm/src
$ rvm docs generate-ri

Test:

$ ri Array.each

2.0.x

Never had a chance to try this one. :) Contributor information is welcome.

1.9.x

Install and select the new Ruby:

$ rvm install 1.9.3-p125
$ rvm 1.9.3-p125

Install the most recent rdoc gem:

$ rvm gemset use global
$ gem install rdoc

Test:

$ ri Array.each

1.8.x

Install and select the new Ruby:

$ rvm install 1.8.7-p358
$ rvm 1.8.7-p358

Install the most recent rdoc gem (for 1.8 you must do it):

$ rvm gemset use global
$ gem install rdoc

Generate RI documentation (takes a while):

$ cd ~/.rvm/src
$ rvm docs generate-ri

Test:

$ ri Array.each

Non-RVM, from source

2.0.x, 2.1.x

Contributor information is highly welcome.

1.9.x

rdoc 2.5 shipped with Ruby 1.9 seems to do the job. No tweaking is required, just build and install:

$ make
$ make install

Test:

$ ri Array.each

1.8.x

If installed with make install by default, RI documentation will be generated in an outdated format, which is no longer supported. Please follow these steps to generate the documentation correctly.

Unpack source:

$ tar xjvf ruby-1.8.7-p352.tar.bz2

Build:

$ cd ruby-1.8.7-p352
$ ./configure
$ make

Install without doc:

$ make install-nodoc

Install the latest rdoc gem:

$ gem install rdoc

Now fix Makefile to use the new rdoc generator instead of the shipped one. Replace the line:

$(RUNRUBY) "$(srcdir)/bin/rdoc" --all --ri --op "$(RDOCOUT)" "$(srcdir)"

with:

rdoc --all --ri --op "$(RDOCOUT)" "$(srcdir)"

Generate and install the docs:

$ make install-doc

Test:

$ ri Array.each
Jump to Line
Something went wrong with that request. Please try again.