3

I'm using rbenv and I'm trying to figure out where the rdoc of my local gems are located.

When I install a gem, it says the rdoc are properly generated, i.e.:

% gem install rails -v "2.3.2"
Successfully installed rails-2.3.2
1 gem installed
Installing ri documentation for rails-2.3.2...
Installing RDoc documentation for rails-2.3.2...

But I cannot figure out where the rdoc files are, in my ~/.rbenv directory I found a doc folder: .rbenv/versions/ree-1.8.7-2012.02/lib/ruby/gems/1.8/doc with folders for local gems in it, each of them contain rdoc and ri folders but they are empty.

Vaz
  • 678
  • 6
  • 16
Adrien Coquio
  • 4,870
  • 2
  • 24
  • 37

1 Answers1

4

Run gem env gemdir to see where you're installing gems. The docs should be under $(gem env gemdir)/doc.

You also might want to make sure you are installing gems with the version of gem you think you are. which gem should point to ~/.rbenv/shims/gem (if it doesn't try hash -r to clear the shell's cache of executable locations). Also, rbenv which gem should point to the gem executable for your current ruby version (which you can find out using rbenv version). If it doesn't, make sure you rbenv rehash, which you must do every time you install a new gem with executables.

Vaz
  • 678
  • 6
  • 16