diff --git a/lib/language_pack/helpers/bundler_cache.rb b/lib/language_pack/helpers/bundler_cache.rb index 72444fd23..0b4988db0 100644 --- a/lib/language_pack/helpers/bundler_cache.rb +++ b/lib/language_pack/helpers/bundler_cache.rb @@ -41,7 +41,6 @@ def exists? # writes cache contents to cache store def store - @cache.store(".bundle") @cache.store(@bundler_dir, @stack_dir) end diff --git a/lib/language_pack/ruby.rb b/lib/language_pack/ruby.rb index 9c332afcb..8678a824a 100644 --- a/lib/language_pack/ruby.rb +++ b/lib/language_pack/ruby.rb @@ -544,6 +544,16 @@ def build_bundler bundle_command = "#{bundle_bin} install --without #{bundle_without} --path vendor/bundle --binstubs #{bundler_binstubs_path}" bundle_command << " -j4" + if File.exist?("#{Dir.pwd}/.bundle/config") + warn(<<-WARNING, inline: true) +You have the `.bundle/config` file checked into your repository + It contains local state like the location of the installed bundle + as well as configured git local gems, and other settings that should +not be shared between multiple checkouts of a single repo. Please +remove the `.bundle/` folder from your repo and add it to your `.gitignore` file. +WARNING + end + if bundler.windows_gemfile_lock? warn(<<-WARNING, inline: true) Removing `Gemfile.lock` because it was generated on Windows. @@ -558,7 +568,6 @@ def build_bundler else # using --deployment is preferred if we can bundle_command += " --deployment" - cache.load ".bundle" end topic("Installing dependencies using bundler #{bundler.version}") @@ -837,7 +846,6 @@ def load_bundler_cache old_stack = @metadata.read(stack_cache).chomp if @metadata.exists?(stack_cache) old_stack ||= DEFAULT_LEGACY_STACK - if old_bundler_version && old_bundler_version != BUNDLER_VERSION puts(<<-WARNING) Your app was upgraded to bundler #{ BUNDLER_VERSION }. @@ -849,8 +857,6 @@ def load_bundler_cache WARNING end - - stack_change = old_stack != @stack convert_stack = @bundler_cache.old? @bundler_cache.convert_stack(stack_change) if convert_stack