# File lib/rubygems/nice_install.rb, line 16 def build_extensions super rescue ExtensionBuildError => e # Install platform dependencies and try the build again. if install_platform_dependencies super else raise end end
# File lib/rubygems/nice_install.rb, line 27 def install_platform_dependencies if ext_installer = DistroGuesser.distro_ext_installer missing_deps = ext_installer.gem_ext_dependencies_for(spec.name).delete_if do |t| ext_installer.ext_dependency_present?(t) end unless missing_deps.empty? say "Installing native dependencies for Gem '#{spec.name}': #{missing_deps.join ' '}" unless ext_installer.install_ext_dependencies_for(spec.name, missing_deps) raise Gem::InstallError, "Failed to install native dependencies for '#{spec.name}'." end end return true end end