2

A gem I'm authoring doesn't have any inline ri/rdoc of any kind, so when users gem install it they get warnings when rubygems tries to compile the docs:

Successfully installed mygem-0.0.1
1 gem installed
Installing ri documentation for mygem-0.0.1...
File not found: lib

I'm assuming this is due to it trying to run the ri tool against my app's lib folder which doesn't exist (gem is all binaries). How can I avoid this error? I tried placing dummy files in lib/ but that didn't help.

tfe
  • 32,666
  • 2
  • 27
  • 24
  • Which toolset are you using to build the gem? – noodl Jan 21 '11 at 13:29
  • What are the settings of `has_rdoc`, `rdoc_options`, `rdoc_files` and `extra_rdoc_files` in your `.gemspec`? – Jörg W Mittag Jan 21 '11 at 14:31
  • I was using Jeweler. Only the basic options are set; none of those you mentioned. I'll look through the gemspec options now. – tfe Jan 21 '11 at 21:19
  • `has_rdoc` is unset but should default to false so that should be fine. I set it explicitly to false just in case. I still get the message when it tries to build the ri though... is there no `has_ri` option anywhere? – tfe Jan 21 '11 at 21:26

1 Answers1

1

So there was actually a confusion of issues on this question. I mistakenly assumed the error message about lib was associated with the message before it about the ri install.

This was not the case. The problem was that the default require_paths is ["lib"] which my gem did not have. Resetting the require_paths in my gemspec eliminated the error.

tfe
  • 32,666
  • 2
  • 27
  • 24