From a5eab8ccef5454411cf084ca1fa559b82f6c9a76 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 17 Aug 2016 17:36:28 +0000 Subject: [PATCH] skip failed gems * tool/rbinstall.rb: skip gems which failed to build extensions. [ruby-dev:49764] [Bug #12683] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ tool/rbinstall.rb | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ec05386e20..fe10eed80f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Aug 18 02:36:26 2016 Nobuyoshi Nakada + + * tool/rbinstall.rb: skip gems which failed to build extensions. + [ruby-dev:49764] [Bug #12683] + Wed Aug 17 23:35:12 2016 Nobuyoshi Nakada * gems/bundled_gems (tk): bump up to 0.1.1. diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index 28315f8bff..83e5c7e020 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -777,8 +777,15 @@ install?(:ext, :comm, :gem) do next if gems.empty? if defined?(Zlib) Gem.instance_variable_set(:@ruby, with_destdir(File.join(bindir, ruby_install_name))) + silent = Gem::SilentUI.new gems.each do |gem| - Gem.install(gem, Gem::Requirement.default, options) + inst = Gem::Installer.new(gem, options) + inst.spec.extension_dir = with_destdir(inst.spec.extension_dir) + begin + Gem::DefaultUserInteraction.use_ui(silent) {inst.install} + rescue Gem::InstallError => e + next + end gemname = File.basename(gem) puts "#{" "*30}#{gemname}" end