Skip to content

Commit

Permalink
Do not assume 'gem' on $PATH is the same as the one that this Ruby ru…
Browse files Browse the repository at this point in the history
…ntime should use. (Or, that 'gem' is found on $PATH at all.)
  • Loading branch information
BanzaiMan committed Jan 25, 2012
1 parent 9f72924 commit 11621ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Rakefile
Expand Up @@ -6,12 +6,14 @@ task :default => [:test]
desc "Install gem dependencies"
task :deps do
require 'rubygems'
require 'rbconfig'
spec = Gem::Specification.load('rack.gemspec')
spec.dependencies.each do |dep|
reqs = dep.requirements_list
reqs = (["-v"] * reqs.size).zip(reqs).flatten
# Use system over sh, because we want to ignore errors!
system "gem", "install", '--conservative', dep.name, *reqs
ruby = File.join(RbConfig::CONFIG["bindir"], RbConfig::CONFIG["RUBY_INSTALL_NAME"])
system ruby, "-S", "gem", "install", '--conservative', dep.name, *reqs
end
end

Expand Down

0 comments on commit 11621ae

Please sign in to comment.