Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Debugging the rubygems upgrade

  • Loading branch information...
commit 690d87ee44a4c48409e187c41e707aeeab5bffc1 1 parent 205c0e2
@mathieuravaux authored
Showing with 14 additions and 1 deletion.
  1. +14 −1 lib/language_pack/ruby.rb
View
15 lib/language_pack/ruby.rb
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.