Permalink
Browse files

Updated ruby_deploy to make use of Gem::Specification instead of Gem.…

…source_index
  • Loading branch information...
1 parent b4fe1a5 commit 42c0ba007b8ebc6d383e45f8ee2e35535fa8733d @aspitz aspitz committed Jul 11, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 bin/ruby_deploy
View
6 bin/ruby_deploy
@@ -169,11 +169,11 @@ class Deployer
def gem_deps_libdirs(gem_name)
# Locate gem spec.
require 'rubygems'
- gemspecs = Gem.source_index.find_name(gem_name)
- if gemspecs.size == 0
+ begin
+ gemspec = Gem::Specification::find_by_name(gem_name)
+ rescue Gem::LoadError
die "Cannot locate gem `#{gem_name}' in #{Gem.path}"
end
- gemspec = gemspecs.last
# Load dependencies libdirs first.
gem_libdirs = []

0 comments on commit 42c0ba0

Please sign in to comment.