[Rubygems-developers] Questions about Gem Platform Matching

Eric Hodel drbrain at segment7.net
Fri Sep 28 04:46:14 EDT 2007


On Sep 27, 2007, at 18:39 , Luis Lavena wrote:
> Hello guys,
>
> After reading Eric's post about the new Gem Platform Matching in
> trunk... I have done some testing now that my sandbox is full of
> rubies:
>
> $ ruby -v ~/Desktop/platform.rb
> ruby 1.8.6 (2007-09-23 patchlevel 110) [i386-mingw32]
> Your cpu is:   "i386"
> Your os is:    "mingw32"
> Your platform is: "x86-mingw32"
>
> ruby 1.8.5 (2006-12-25 patchlevel 12) [i386-mswin32]
> Your cpu is:   "i386"
> Your os is:    "mswin32"
> Your platform is: "x86-mswin32"
>
> ruby 1.8.6 (2007-09-23 patchlevel 110) [i386-mswin32_80]
> Your cpu is:   "i386"
> Your os is:    "mswin32_80"
> Your platform is: "x86-mswin32"
>
> ruby 1.9.0 (2007-09-27 patchlevel 0) [i386-mswin32_80]
> Your cpu is:   "i386"
> Your os is:    "mswin32_80"
> Your platform is: "x86-mswin32"
>
>
> I don't know if the problem is noticeable, but I'll bold it:
>
> All the builds with MS tools states "x86-mswin32"... but both use
> different compilers: mswin32 are build with VC6 (the official build)
> and the mswin32_80 is with latest VS2005 compiler (VC8).
>
> both compilers links against different runtime libraries (msvcrt.dll
> and msvcr80.dll respectively).
>
> Also, the extensions compiled will not find the ruby18 shared library
> (msvcrt-ruby18.dll and msvcr80-ruby18.dll).
>
> So... that will not work and produce broken gems and a lot of traffic
> about "hey, tried to install this and it's broken!).
>
> Should the version for mswin32 (current nil) be used for this case?

Probably.  Is there a way to get the value out of Config::CONFIG?

I think people expect an x86-mswin32 platform gem to work with  
whatever the latest one-click installer is.  RubyGems also provides a  
required_ruby_version check, so you can lock it down to a particular  
ruby one-click version.


More information about the Rubygems-developers mailing list