Permalink
Browse files

Debugging the rubygems upgrade

  • Loading branch information...
1 parent f0fe984 commit f1d3f328110ef1e3dcd6541add6b8e5ff302499e @mathieuravaux committed Mar 13, 2013
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/language_pack/ruby.rb
@@ -35,7 +35,7 @@ def self.gem_version(name)
gem_version = nil
bootstrap_bundler do |bundler_path|
$: << "#{bundler_path}/gems/bundler-#{LanguagePack::Ruby::BUNDLER_VERSION}/lib"
- gem = lockfile_parser.specs.detect {|gem| gem.name == name }
+ gem = lockfile_parser.specs.detect {|g| g.name == name }
gem_version = gem.version if gem
end
@@ -216,7 +216,8 @@ def setup_profiled
def update_rubygems
version = run("gem --version").strip
if version < MIN_RUBYGEMS_VERSION
- command = "env GEM_PATH=#{slug_vendor_base} gem update --system --verbose --backtrace 2>&1"
+ command = "env GEM_HOME=#{slug_vendor_base} PATH=$HOME/bin:$HOME/#{slug_vendor_base}/bin GEM_PATH=#{slug_vendor_base} gem update --system --verbose --backtrace 2>&1"
+ puts run()
topic "Updating rubygems (#{command})"
pipe(command)
version = run("gem --version").strip
@@ -362,7 +363,7 @@ def uninstall_binary(path)
# @param [String] tmpdir to store the libyaml files
def install_libyaml(dir)
FileUtils.mkdir_p dir
- Dir.chdir(dir) do |dir|
+ Dir.chdir(dir) do |d|
run("curl #{VENDOR_URL}/#{LIBYAML_PATH}.tgz -s -o - | tar xzf -")
end
end

0 comments on commit f1d3f32

Please sign in to comment.