[Rubygems-developers] Possible Fix for the "gem update rails" bug on WInXP

Jim Weirich jim at weirichhouse.org
Fri Mar 11 00:52:38 EST 2005

Actually, I don't think the bug is WinXP only, nor directly related to rails.  
But the following message is typical of this kind of error ...
Attempting remote installation of 'actionmailer'
ERROR:  While executing gem ... (NoMethodError)
     undefined method `serialize' for 

This error manifests as an error message that /looks/ as if the client code is 
being run.  Since RubyGems doesn't run client code during an install, this 
bug has mystified me for some time.

So today I was reading through the Installer class working on an unrelated 
issue when I noticed that the installer used a "require_gem" command on the 
dependencies, and attempted to set the autorequire flag to false.  The 
problem is that require_gem doesn't support an autorequire flag.  So if a gem 
has a dependency, and that dependent gem has a autorequire file specified, 
then that autorequire file will be loaded during the installation.

This is quite possibly the source of the bug mentioned above.  I've fixed the 
problem in CVS, and would like anyone who has had the above problem (or a 
similar one) to give the CVS version a try and see if it fixes anything 
(Unfortunately (or perhaps fortunately) I've never run into the problem on my 


-- Jim Weirich    jim at weirichhouse.org     http://onestepback.org
"Beware of bugs in the above code; I have only proved it correct, 
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)

More information about the Rubygems-developers mailing list