Zed Shaw wrote:
James, you seem like a non-newbie Ruby fellow, judging from:
http://www.jamesbritt.com/
So I'm curious why you mention the update command updating all your gems
every time I tell people to update. Are you indirectly saying I
shouldn't tell people that, or are you asking a question? From your
blog it would seem that you understand RubyGems fairly well so I'm a
little baffled why your e-mail seems to imply that you're baffled by the
update command.
No, I don't understand rubygems all that well. Like much software, the available commands have evolved, and I tend to use only a small subset with any regularity, so over time I lose tack of what the current options are and how they may differ from past behavior.
As with much software, there can be unintended behavior or inconsistent behavior with unpleasant side effects. At least at some point running gem update would simply update all gems even if you gave a list of gems. Now you can update selected gems, but the initial behavior is still there if called with no other arguments, which is what you instructed.
Not being harsh, just curious why you mention this every time. Maybe
there's something about gem update that I'm missing and you need to just
tell me about? Maybe a misunderstanding that the RubyGems manual
doesn't clarify?
Because, they way your mail states it, (or at least the way I read it), you are suggesting that people run this:
gem update
which will update all installed gems
And I've been bitten by that before; not all updates are good, and undoing an update or locking code to specific gem versions can get tedious.
But this command:
gem install mongrel
does what (I now gather) is intended, with no confusion.
This is different from telling people to use, say, 'gem install'; it become obvious quite fast, and with no unexpected side effects, that another argument is needed. Unfortunately, there is no symmetry with 'gem update'. I'd prefer if 'gem update' always required additional arguments, perhaps -all to update all gems. And I half expected that simply running 'gem update' would ask for the names of the gems to update (things change). But it does not.
I'm also unclear if there is any difference between running 'gem update mongrel' or 'gem install mongrel'; my usage of rubygems tends towards either uninstalling or (rarely) uninstalling. So perhaps running 'gem install <foo>' is a better way to update; no accidental behavior. But there may be other factors with that (such as fetching the index).
The ability to update selected gems is, think, a (fairly) recent feature. Maybe motivated by past whining from me.
The ambiguity of your instructions, though, leave open the real chance that people are going to get more than they asked for. And I want to make that clear before someone starts complaining that after updating Mongrel, other, unrelated code, stopped working.
I believe now that when you instruct people to run "gem update" you are assuming that they know to add a third argument specifying a particular gem to update. I think that is a mistaken assumption, and would prefer that people not learn about it the hard way.
And I know that you are an experienced Rubyist, but I also considered the real possibility that you in fact believed the best or right way for people to update Mongrel was by updating all their gems. But if Zed says "run 'gem update'", people will do exactly that.
···
--
James Britt
"In Ruby, no one cares who your parents were, all they care
about is if you know what you are talking about."
- Logan Capaldo