15

I have several gems installed in multiple locations.

What is the hard/easy way to generate/re-generate:

  • rdoc for all these installed gems, all at once?
  • yardoc for all these installed gems, all at once?
skaffman
  • 398,947
  • 96
  • 818
  • 769
Dharam Gollapudi
  • 6,328
  • 2
  • 34
  • 42
  • Related (but not identical) question: http://stackoverflow.com/questions/664651/can-you-install-documentation-for-existing-gems – Andrew Grimm Sep 15 '10 at 02:36

2 Answers2

24

Have you tried one of these?

gem rdoc --all
gem rdoc --all --overwrite
the Tin Man
  • 158,662
  • 42
  • 215
  • 303
  • Thanks Greg: After posting the question, I have figured out that gem rdoc --all is the way to go for rdoc regeneration. For yardoc there seems to be no simple switch yet, like gem rdoc --yard or gem yardoc or something like that. – Dharam Gollapudi Jul 02 '10 at 17:16
  • If you have multiple gem installations or multiple Rubies installed, and are *not* using RVM, then I recommend looking into it. It can make your life easier. It might even have the capability to rebuild docs for all gemsets it manages. http://rvm.beginrescueend.com/ – the Tin Man Jul 03 '10 at 01:10
  • 5
    ```gem rdoc --all --rdoc``` worked better for me, especially if you had turned off rdoc installs in your .gemrc – Justin Jun 29 '13 at 18:39
10
yard gems

or

sudo yard gems

should do the job. You may also want to use the --rebuild flag. If you want to run a local Yardoc server for your installed gems, then run

yard server -g
Christoph Petschnig
  • 4,047
  • 1
  • 37
  • 46
  • Is there any way to let yard store the gem object data somewhere else instead of the default .yardoc folder within the gem. The reason is that most of the IDEs while indexing the gems, are also indexing the data in .yardoc folder, which takes longer. I couldn't find a settings to exclude .yardoc pattern in any of the IDES. If I could have yard store this data somewhere like ~/.yardoc, would take care of the problem. – Dharam Gollapudi Sep 15 '10 at 17:05