tags:

views:

97

answers:

2

I've setup the following in my ~/.gemrc file

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

so that when I do gem install some_gem, the rdocs won't get installed to not pile up my disk.

But for some gem, I'ld like to install the rdocs as well. So i tried,

gem install some_gem --rdoc --ri

the docs doesn't get downloaded. How can I force the gem install to download rdocs as well for some gem if I wnat to??

A: 

--rdoc and --ri are indeed the correct options, according to gem help install. If it doesn't work as expected, I assume that you have to edit your ~/.gemrc every time you want to install rdocs and ri.

August Lilleaas
+3  A: 

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

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

You may even be able to get away with not creating a confile file at all and running

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

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

Steve Weet