diff options
Diffstat (limited to 'lib/rubygems/request_set.rb')
-rw-r--r-- | lib/rubygems/request_set.rb | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/lib/rubygems/request_set.rb b/lib/rubygems/request_set.rb index 49e56ae6fb..5541e64b88 100644 --- a/lib/rubygems/request_set.rb +++ b/lib/rubygems/request_set.rb @@ -163,26 +163,9 @@ class Gem::RequestSet end end - spec = - begin - req.spec.install options do |installer| - yield req, installer if block_given? - end - rescue Gem::RuntimeRequirementNotMetError => e - recent_match = req.spec.set.find_all(req.request).sort_by(&:version).reverse_each.find do |s| - s = s.spec - s.required_ruby_version.satisfied_by?(Gem.ruby_version) && s.required_rubygems_version.satisfied_by?(Gem.rubygems_version) - end - if recent_match - suggestion = "The last version of #{req.request} to support your ruby & rubygems was #{recent_match.version}. Try installing it with `gem install #{recent_match.name} -v #{recent_match.version}`" - suggestion += " and then running the current command again" unless @always_install.any? { |spec| spec == req.spec.spec } - else - suggestion = "There are no versions of #{req.request} compatible with your ruby & rubygems" - suggestion += ". Maybe try installing an older version of the gem you're looking for?" unless @always_install.any? { |spec| spec == req.spec.spec } - end - e.suggestion = suggestion - raise - end + spec = req.spec.install options do |installer| + yield req, installer if block_given? + end requests << spec end |