How do I force gem install to download the docs file?

I have set the following in my ~ / .gemrc file

gem: --no-ri --no-rdoc


so when I do gem install some_gem the rdocs will not be installed so as not to accumulate my disk.

But for some gem, I wanted to install rdocs too. So I tried,

gem install some_gem --rdoc --ri


documents are not loaded. How can I get the gem installation to download rdocs as well for some gem if I wnat to ??


source to share

2 answers

You can create a second config file named ~ / .gemrc_withdoc or something similar and include commands to install with documentation and then try the following command

gem install some_gem --config-file=~/.gemrc_withdoc


You can even get away without creating a confile file at all and working

gem install some_gem --config-file=/dev/null


This should work as expected because gem will only use one config file, either specified on the command line or ~ / .gemrc. He will never use both




and --ri

are indeed the correct parameters, according to gem help install

. If it doesn't work as expected, I assume that you need to edit your ~ / .gemrc every time you want to install rdocs and ri.



All Articles