diff options
Diffstat (limited to 'lib/rubygems/commands/setup_command.rb')
-rw-r--r-- | lib/rubygems/commands/setup_command.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/rubygems/commands/setup_command.rb b/lib/rubygems/commands/setup_command.rb index 5bd5ebd468..f5f5185f86 100644 --- a/lib/rubygems/commands/setup_command.rb +++ b/lib/rubygems/commands/setup_command.rb @@ -2,7 +2,6 @@ require 'rubygems/command' require 'fileutils' require 'rbconfig' require 'tmpdir' -require 'pathname' ## # Installs RubyGems itself. This command is ordinarily only available from a @@ -117,6 +116,8 @@ By default, this RubyGems will install gem as: say "RubyGems #{Gem::VERSION} installed" + uninstall_old_gemcutter + install_rdoc say @@ -359,5 +360,14 @@ abort "#{deprecation_message}" r.document args end + def uninstall_old_gemcutter + require 'rubygems/uninstaller' + + ui = Gem::Uninstaller.new('gemcutter', :all => true, :ignore => true, + :version => '< 0.4') + ui.uninstall + rescue Gem::InstallError + end + end |