Probably most of the time you would like to skip ri and RDoc installation while installing some new gems, specially on production server.
I do like to skip ri and RDoc documentation while installing gems on my development machine, because it takes more time to generate ri and RDoc then actual installation of gem.
We can skip rdoc and ri documentation while installing a gem by:
[bash]
gem install rails –no-ri –no-rdoc
[/bash]
I am sure that you would not like to give –no-ri and –no-rdoc every time you install a gem. To avoid this situation, you can create/update $HOME/.gemrc file with following option:
[bash]
gem: –no-ri –no-rdoc
[/bash]
Now every time you install a gem, it will skip installation of ri and RDoc for the gem.
My .gemrc file looks like:
[bash]
—
:update_sources: true
:sources:
- http://gems.rubyforge.org/
- http://gems.github.com
:benchmark: false
:bulk_threshold: 1000
:backtrace: false
:verbose: true
gem: –no-ri –no-rdoc
[/bash]
Nice trick, is there any reference for all the setting we can set here ?
No, I don’t have such reference. It was just a hit and try
Why would somebody wanna do this?
Dont you like “gem server” as your local doc server?
@Abhishek: It depends person to person, I don’t use “gem server”. Infact, I just used it once or twice. So why should I wait for ri and rdoc installation, even I don’t use them.
You’d want to do this on a production server for example a cloud based system as you’re starting from scratch you want gem install to be as quick as possible. This is a great solution in combination with config.gem and rake gems:install. Thanks!
[...] This post was mentioned on Twitter by Jeremy Weiland, Anikendra. Anikendra said: Disable documentation on gem install: http://is.gd/7uWlX #ruby [...]
[...] thought about this now: skipping gem documentation on the production server. Makes much more [...]
Build & Install Ruby Gems with Rake…
Are you using rake to build your gems? Have you ever wished there were an install task to install it to your machine? ……
[...] /2008/12/03/skiping-installation-of-ri-and-rdoc-documentation-while-installing-… LikeBe the first to like this post.▶ No Responses /* 0) { jQuery('#comments').show('', change_location()); jQuery('#showcomments a .closed').css('display', 'none'); jQuery('#showcomments a .open').css('display', 'inline'); return true; } else { jQuery('#comments').hide(''); jQuery('#showcomments a .closed').css('display', 'inline'); jQuery('#showcomments a .open').css('display', 'none'); return false; } } jQuery('#showcomments a').click(function(){ if(jQuery('#comments').css('display') == 'none') { self.location.href = '#comments'; check_location(); } else { check_location('hide'); } }); function change_location() { self.location.href = '#comments'; } }); /* ]]> */ [...]
Thats a great trick… installing ri and rdoc is really boring…
Thanks Akhil for the useful post. It works great.
Hey there! I know this is kinda off topic but I was wondering if you knew where I could find a
captcha plugin for my comment form? I’m using the same blog platform as yours and I’m having difficulty finding one?
Thanks a lot!