Permalink
Browse files

Debugging the rubygems upgrade

  • Loading branch information...
mathieuravaux committed Mar 13, 2013
1 parent 205c0e2 commit 690d87ee44a4c48409e187c41e707aeeab5bffc1
Showing with 14 additions and 1 deletion.
  1. +14 −1 lib/language_pack/ruby.rb
View
@@ -75,6 +75,7 @@ def compile
setup_language_pack_environment
setup_profiled
update_rubygems
+ write_git_hash
allow_git do
install_language_pack_gems
build_bundler
@@ -216,10 +217,16 @@ def setup_profiled
def update_rubygems
version = run("gem --version").strip
if version < MIN_RUBYGEMS_VERSION
- 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"
+ purge_bundler_cache
+ command = "env GEM_HOME=#{slug_vendor_base} PATH=$HOME/bin:$HOME/#{slug_vendor_base}/bin GEM_PATH=#{slug_vendor_base} gem update --system --backtrace 2>&1"
topic "Updating rubygems (#{command})"
pipe(command)
version = run("gem --version").strip
+
+ puts "rubygems version without env vars: #{version}"
+ version_with_env_vars = run("env GEM_HOME=#{slug_vendor_base} PATH=$HOME/bin:$HOME/#{slug_vendor_base}/bin GEM_PATH=#{slug_vendor_base} gem --version").strip
+ puts "rubygems version with env vars: #{version_with_env_vars}"
+
end
puts "Using rubygems version #{version}"
end
@@ -318,6 +325,12 @@ def gems
[BUNDLER_GEM_PATH]
end
+ def write_git_hash
+ topic "Saving the git hash"
+ puts "GIT_DIR: #{ENV['GIT_DIR']}"
+ puts run("ls #{ENV['GIT_DIR']}")
+ end
+
# installs vendored gems into the slug
def install_language_pack_gems
FileUtils.mkdir_p(slug_vendor_base)

0 comments on commit 690d87e

Please sign in to comment.