Unfortunately, this can be problematic because Ruby was too idealistic between 1.9.1 and 1.9.3. :( Bundler installs gems according to the version of the Ruby ABI, and Ruby claims that 1.9.3 shares an identical binary interface with 1.9.1. That means Bundler will share gems between 1.9.1, 1.9.2, and 1.9.3, even though those gems may cause segfaults if they were compiled on a different ruby version than the one that is currently running.

I think the only way to solve this is to only share the caches between runs with the same env.