How to specify no ri/rdoc exists for a gem so user doesn't get warning when trying to install

StackOverflow https://stackoverflow.com/questions/4756057

문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top