Sounds like a movie, but should be applicable on every day work. I found that even you can trick RubyGems to do something, it doesn’t meant it is right. Please keep reading to understand my opinion.
The power behind –platform
Since version 1.0 of RubyGems, there is a new parameter that let you force the platform on which you’re installing the gem.
Note that I highlighted force… you may wonder why?
Since I started to work on MinGW built of Ruby, lot of gems require a bit of tweaks and rework since they are not prepared to handle
mingw32 like they do for
mswin32 platforms. Some of them just the binary part, some other logic into the Ruby code.
Since there are lot of gems that are not ready for
mingw32, someone can force the use of
mswin32 since MinGW and Visual C compiler states to be binary compatible, but that doesn’t meant the library is.
This was raised by Fabio Akita in rubyinstaller-devel mailing list (check it here) and I replied there too.
Even you can install the gem on different platforms it doesn’t meant will work.
Mongrel 1.1.5 is a great example of that. I put my time in fix 1.2 branch for MinGW instead of 1.1.x series since I thought was the next release in the roadmap, and I got it wrong.
So 1.1.5 go out without a proper MinGW condition of the platform and even if you forced the platform during the gem installation, Mongrel wouldn’t work.
I fixed this and released a proper
mingw32 gem of Mongrel 1.1.5 for you guys to download one week ago. Please remove the incorrect one (
gem uninstall mongrel) and install the proper one.
Other libraries may face the same issue, so be careful with the powers you have, use them wisely.