如何在以后安装gems的ri和rdoc文件?

iro*_*and 5 gem ruby-on-rails

我通常不需要ri和rdoc,所以我这样写~/.gemrc.

install: --no-ri --no-rdoc
update: --no-ri --no-rdoc
Run Code Online (Sandbox Code Playgroud)

我有空的时候想安装它们.之后如何为已安装的gem安装ri和rdoc文件?

Tod*_*obs 10

# See the relevant help.
gem help rdoc

# Generate rdoc and ri for the "foo" gem.
gem rdoc --ri foo

# Generate rdoc for all installed gems.
gem rdoc --all
Run Code Online (Sandbox Code Playgroud)

  • 谢谢!我可以用`gem rdoc --all --ri`安装. (3认同)