ruby_core_ri gem ==
This gem installs a local copy of the trunk RI, which is useful for those ruby distros that are lacking the core RI (ex: rubyinstaller).
For example, if you get this:
$ ri File Nothing known about File
$
Then after installing this gem, you will get the following (the ri is there now):
$ ri File ————————————————— Class: File < Object
FTOOLS.RB: EXTRA TOOLS FOR THE FILE CLASS
Author: WATANABE, Hirofumi
Documentation: Zachary Landau
… [etc.]
The gem downloads the source for your current Ruby version, then does a gem –ri, thus installing the ri for Ruby’s core docs locally, though really as a gem.
Installation (takes a little while–it’s worth it if you want to use ri for core classes, though) ==
$ gem install ruby_core_ri
$ ruby_core_ri # downloads your distro’s sources, ri’s them
-
Note: for 1.9 users you have to install rdoc > 2.4.3 for it to work (possibly even > 2.5.0).
To do so (until bugs are fixed in rdoc trunk):
$ gem install specific_install # install this gem plugin $ gem specific_install -l http://github.com/downloads/rdp/ruby_core_ri/rdoc-2.4.3.1.gem # install a slightly fixed version that actually works with trunk Or install that gem version by hand.
Trouble Shooting ==
With gems v 1.3.6, gems now always “doesn’t re-generate” ri and rdoc (even on failed attempts of the same).
So if you attempt an install and “nothing happens” ex:
$ gem rdoc –no-rdoc –ri ruby_core_ri
$ # note lack of output
Then you may have to uninstall the gem, or remove your equivalent of C:Ruby19librubygems1.9.1docruby_core_ri-0.4.0 before running ruby_core_ri again (then it will work). You may also need to uninstall the mislav-hanna gem first, if you have it installed.