Why are we installing Ruby 1.9.2/1.9.3 gems into a 1.9.1 folder?

In Ruby 1.9.0, the C interface was changed from the Ruby 1.8 series.

Gems that compile to native code had to be recompiled.

The interface was again changed in Ruby 1.9.1 and kept the same in Ruby 1.9.2 & 3. This explains the 1.9.1 you are seeing in your path.

The idea is that you can install different versions of Ruby on your system and that gems would be shared within groups having the same C api. So Ruby 1.8.6 and 1.8.7 could share their gems, and so could Ruby 1.9.1, .2 and .3.

It’s not necessarily the best idea, though. In any case, most people use rvm to access different versions of Ruby and rvm keeps gems separate for each version, irrespective of the C api version.

Leave a Comment