
rubygems -no-ri -no-rdoc Feb 25, 2011 01:38
@dhh offered a patch to rubygems to adjust the default behavior to not generate local ri and rdoc. The main motivation in my opinion is that it's horribly slow and almost always unnecessary.
Of course you can add gem: --no-ri --no-rdoc to your ~/.gemrc file and I have done that, but I agree that the default should be modified to reflect the common practice as it changes over time. One person argued that if the problem is speed, then fix that problem. I agree wholeheartedly, but in the meantime the practical fix is to have a sane default.
My main issue with rubygems (and ri/rdoc) is that the performance sucks. Dependency resolution takes forever. There's got to be a better way. The Ruby community has already offered a few alternatives. I'm not privy to all the details and/or politics, all I know is that performance matters and rubygems needs to be better. Why can't all of the brilliant minds in the Ruby community fix this problem within rubygems?
We use rubygems internally a lot. Nearly all of our applications are written as gems that we plug into our deployment stack. This means that our code is versioned and can be distributed via geminabox (great little gem server). This helps us control gem versions quite nicely and it was our solution before bundler arrived on the scene.
But because dependency resolution is so slow, I often don't bother to specify it because it's so painful. Yes, I know you can run it with --ignore-dependencies and create a separate rake task from jeweler's default to handle it... But in my mind, it's all about sane defaults, accepted convention and performance.
One suggestion that I also liked was to have the gem author generate docs before distribution of the gem. This trades increased bandwidth consumption/disk space for decreased CPU usage...it's funny how in this case the scarce resource is CPU and not bandwidth! If that doesn't put some perspective on how inefficient ri and rdoc is, then I don't know what will.
Other people have offered up complicated compromises. I generally eschew complexity and in this case I don't think it's a good idea. In the meantime, I agree with @dhh and think we can take one small step towards sanity and make the default -no-ri -no-rdoc.
Write a comment
- Required fields are marked with *.







