0

I want to read some of the documentation for the rb-gsl gem. For example the rdoc file for the multimin class. How do I view this file in a browser and follow the links that are in the file (which appear to refer to other rdoc files in the same repository).

Obromios
  • 15,408
  • 15
  • 72
  • 127

1 Answers1

2

There are at least two options I know of to view rdoc documentation for gems:

  1. Using the online documentation - for example: https://rdoc.info/github/SciRuby/rb-gsl/
  2. Using Yard

With Yard, you can do many things, including running a local server to show the documentation for all the installed gems.

$ gem install yard
$ yard server --gems --port 3000

Then, visit http://localhost:3000 to see a list of gems, each with its full documentation.

DannyB
  • 12,810
  • 5
  • 55
  • 65
  • I had a look at the rdoc.info site, clicking the links, I cannot find the multimin description. I also tried looking for ```FdfMinimizer``` which is a class described in the mutlimin rdoc file but no luck. If I look for it on the site search box nothing comes up. Are you able to show me the link for it? I did ```gem install yard``` and it seems to install yard-0.9.26 bult when I try to start the server or even type ```yard --help``` I get ```-bash: yard: command not found``` – Obromios Jun 20 '21 at 21:00
  • I believe the rdeoc folder is used for generating some docs site. You might be able to view it with yard locally. I found a rendering of it here: https://blackwinter.github.io/rb-gsl/rdoc/multimin_rdoc.html -as for yard not working, log out and log in should fix it. If not, you have a problem in your ruby setup. – DannyB Jun 21 '21 at 05:23
  • Thanks for finding the blackwinter site. Logging in and out fixed yard.But I am not seeing the multimin documentation, but there is something strange with my setup or with rb-gsl/gsl. I will investigate and get back to you on this. In the meant time, you have answered my general question so I will accept and upvote your answer – Obromios Jun 21 '21 at 06:26
  • It looks like rb-gsl has some sort of protocol converter between ruby and C to call the C functions without actually having an explicit ruby method, so it seems likely to me that the normal rdoc processes will not work. – Obromios Jun 22 '21 at 00:40