From: James Britt Date: 2004-12-17T22:42:19+09:00 Subject: Re: gem update behavior (Re: [ANN] Rails 0.9: Fast development, breakpoints, validations...) David A. Black wrote: > Hi -- > > On Fri, 17 Dec 2004, James Britt wrote: > >> David Heinemeier Hansson wrote: >> >>> ... >>> As also, the easiest way to upgrade the software is: "gem update" >> >> >> >> Running gem update will update *all* installed gems. >> >> If any gem (not just a rails gem) has an API change, then you'll have >> to go change your code to either use the new API or to request a >> specific gem version. Probably better to update gems on purpose, when >> you have some idea what to expect, rather than doing a bulk update on >> every gem just to get a few specific items. >> >> Running >> gem install rails >> >> should update all rails-related gems without affecting any other gems, >> which is a safer, more responsible, suggestion on how to upgrade rails. > > > I believe David meant it as in: "Use the 'gem update' command (which > in this case, since you're updating Rails, would take the argument > 'rails')", just as one might say, "Use the 'ruby' command to run a > Ruby script". Well, even if that is the intention, it is not the behavior. gem update foo updates every gem, not just foo. > > It's true wording of this kind is slightly ambiguous, but that's all. > It's not the first time something has had to be clarified a bit. I'd > like to nip in the bud the implication that David was trying to steer > people toward updating all their gems at once, which he wasn't and > which attributes to him either ignorance of gems or some kind of > bizarre pranksterism -- wrongly, in either case. I don't think David was advocating one update all gems, but that is the end result, and it has been pointed out here before. I've also mentioned it to Jim W., as I was caught off-guard by this on a previous rails update. I suggested that either 'update foo' should should update only foo, or at least warn that it will update all gems. To check this, I just ran c:\>gem install rubygems Attempting local installation of 'rubygems' Local gem file not found: rubygems*.gem Attempting remote installation of 'rubygems' Updating Gem source index for: http://gems.rubyforge.org Successfully installed rubygems-update, version 0.8.3 Installing RDoc documentation for rubygems-update-0.8.3... WARNING: Generating RDoc on .gem that may not have RDoc. (But note: c:\>gem -v 0.8.1 ) I then ran gem update rake and rubygems proceeded to try to update all my gems. (Ironically, it choked and died trying to update the rails actionmailer gem.) c:\>gem update rake Upgrading installed gems... Attempting remote upgrade of actionmailer Attempting remote installation of 'actionmailer' ERROR: While executing gem ... (NoMethodError) undefined method `serialize' for CGI::Session::ActiveRecordStore::Session:Class Thanks, James