--- Makefile.orig	2018-07-01 11:16:07 UTC
+++ Makefile
@@ -11,7 +11,7 @@ INSTALL_DEST_DIR := $(DESTDIR)$(PREFIX)/
 COVERAGE_DIR := $(TARGET_DIR)/cover
 ASSEMBLY_ROOT := $(TARGET_DIR)/assembly
 export GITALY_TEST_RUBY_DIR := $(BUILD_DIR)/ruby
-BUNDLE_FLAGS ?= --deployment
+BUNDLE_FLAGS ?= --local
 
 BUILDTIME = $(shell date -u +%Y%m%d.%H%M%S)
 VERSION_PREFIXED = $(shell git describe)
@@ -57,7 +57,7 @@ build:	.ruby-bundle $(TARGET_SETUP)
 
 .ruby-bundle:	ruby/Gemfile.lock ruby/Gemfile
 	cd ruby && bundle config # for debugging
-	cd ruby && bundle install $(BUNDLE_FLAGS)
+	cd ruby && rm Gemfile.lock && bundle install $(BUNDLE_FLAGS)
 	cd ruby && bundle show gitaly-proto # sanity check
 	touch $@
 
