From 57bfe1f4fd19f766677e08b132d0a16fad2ad706 Mon Sep 17 00:00:00 2001 From: Robin Houston Date: Thu, 31 May 2012 12:06:42 +0100 Subject: =?UTF-8?q?Revert=20"Let=E2=80=99s=20try=20fixing=20bundler=20inst?= =?UTF-8?q?ead"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 9f5ad85b6ff541a8e4dc83e91548af9c745d64af. --- script/rails-post-deploy | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'script/rails-post-deploy') diff --git a/script/rails-post-deploy b/script/rails-post-deploy index 193d0bbec..a2761ecbc 100755 --- a/script/rails-post-deploy +++ b/script/rails-post-deploy @@ -80,7 +80,28 @@ then bundle_install_options="--without development:test --deployment" fi -bundle install $bundle_install_options +# Ordinarily we would expect simply to run "bundle install" here. +# However, at the time of writing there is a bug in bundler that +# causes gems from github to be rebuilt every time bundle install +# is run, which makes the process very extremely slow in our case +# because Xapian takes a long time to build. Running +# "bundle exec bundle install" is a workaround for this bug. +# +# However clearly one cannot run bundle exec till the bundle has +# initially been installed, so we use a flag file .bundler-has-run +# to indicate whether we are doing an initial install. +# +# If you ever need to rerun the initial install, just remove +# this flag file. +# +# https://groups.google.com/forum/?fromgroups#!topic/alaveteli-dev/lCDuW9H4uBI +if [ -e .bundler-has-run ] +then + bundle exec bundle install $bundle_install_options +else + bundle install $bundle_install_options + touch .bundler-has-run +fi if [ -n "$OPTION_THEME_URLS" ] then -- cgit v1.2.3