For example; if I want to install any architecture-dependent gem, like nokogiri
(xml library for ruby), but for any architecture-dependent gem, the case is the same.
I use an x86 distribution, but on an x86_64 kernel. My ruby is 32-bit, but a gem install nokogiri
installs the 64-bit version (what will cause an error, because its shared lib can not link to the 32-bit ruby).
How is it being decided? My ruby is 32-bit, I want the 32-bit gem. The problem is very similar in an armhf/arm64 constellation or if I am trying to use any different emulation layer (like qemu-user or cygwin or wine). In general, I want to install the gem which matches my ruby interpreter and not the one which is autodetected by something.
What to do?