summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/bundler/rubygems_gem_installer.rb6
-rw-r--r--lib/bundler/source/rubygems.rb2
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/bundler/rubygems_gem_installer.rb b/lib/bundler/rubygems_gem_installer.rb
index 43637e1e60..e18f46268b 100644
--- a/lib/bundler/rubygems_gem_installer.rb
+++ b/lib/bundler/rubygems_gem_installer.rb
@@ -3,6 +3,12 @@ require "rubygems/installer"
module Bundler
class RubyGemsGemInstaller < Gem::Installer
+ unless respond_to?(:at)
+ def self.at(*args)
+ new(*args)
+ end
+ end
+
def check_executable_overwrite(filename)
# Bundler needs to install gems regardless of binstub overwriting
end
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb
index d9606e7087..aedad7086d 100644
--- a/lib/bundler/source/rubygems.rb
+++ b/lib/bundler/source/rubygems.rb
@@ -134,7 +134,7 @@ module Bundler
installed_spec = nil
Bundler.rubygems.preserve_paths do
- installed_spec = Bundler::RubyGemsGemInstaller.new(
+ installed_spec = Bundler::RubyGemsGemInstaller.at(
path,
:install_dir => install_path.to_s,
:bin_dir => bin_path.to_s,