class Bundler::RubygemsIntegration::AlmostModern

Rubygems 1.8.0 to 1.8.4

def preserve_paths

change it back for our sudo mode to work.
you call Gem::Installer#install with an :install_dir set. We have to
Rubygems [>= 1.8.0, < 1.8.5] has a bug that changes Gem.dir whenever
def preserve_paths
  old_dir = gem_dir
  old_path = gem_path
  yield
  Gem.use_paths(old_dir, old_path)
end