[Rubygems-developers] odd behavior of gem#name with obsolte MSWIN32 platform.

Eric Hodel drbrain at segment7.net
Mon Oct 22 15:53:26 EDT 2007

On Oct 22, 2007, at 12:26 , Luis Lavena wrote:
> I'm checking some odd naming behavior with latest beta.
> I just installed a gem with platform mswin32, which installed just
> fine, but found that it's named wrong by RubyGems.
> as Example:
> mongrel-1.0.1-mswin32.gem, install just fine, it list just fine.
> Folder on which is installed:
> mongrel-1.0.1-mswin32, everything seems ok.
> [...]
>  {:path=>"mongrel-1.0.2-x86-mswin32-60", :gem_name=>"mongrel"},
> [...]
> please note that the platform for mongrel isn't mswin32, but
> x86-mswin32-60 ... and don't match with the folder it installed...
> gem#name is returning that, disregarding the current folder where the
> gem was installed...

I tried to force converting all legacy platforms, but found it was  
too difficult due to the way that platforms are loaded.  RubyGems is  
smart enough to correctly uninstall a legacy platform gem.  You can  
access the legacy gem via Gem::Specification#original_platform.

I think this is ok, since Gem::Installer and Gem::Uninstaller take  
care of the details for you.

Poor workers blame their tools. Good workers build better tools. The
best workers get their tools to do the work for them. -- Syndicate Wars

More information about the Rubygems-developers mailing list