Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

[dev_setup] Clear bundler config

  This change clears all bundler remembered settings before attempting
an installation.
  Probably due to the huge repository size, a lot of users try copying
their repos around, despite the recommended best practice of only
copying the bare repo. This change should solve the problem of a
conflict between the dev / test group of gems and production gems for
components, say the Cloud Controller.

  The installer now prompts the user before purging those .bundle
directories, or if you want to run non-interactively, pass --all or -a
to it.

Change-Id: I04b6b9ad462546b51ab1ee11e7e8de91263372bd
  • Loading branch information...
commit f539791a32a530a6aa20f25098bb2efca73bc4f7 1 parent 7c2b382
@d d authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 dev_setup/bin/vcap_dev_setup
12 dev_setup/bin/vcap_dev_setup
@@ -84,6 +84,16 @@ function run_cmd () {
+function clear_bundler_settings () {
+ # Do we have a Bundler problem?
+ find $CLOUDFOUNDRY_HOME/vcap -type d -name .bundle | grep -Fq .bundle || return 0
+ if [ "$ALL" != true ]; then
+ read -p "Remembered Bundler options could cause you troubles, do you want me to clear them for you? [Y/n]"
+ [[ $REPLY =~ ^[nN] ]] && return 0
+ fi
+ (cd $CLOUDFOUNDRY_HOME/vcap && rake bundler:reset || find -type d -name .bundle -prune -exec rm -r {} \; )
# Check if we have access to the web
run_cmd apt-get $APT_CONFIG install -qym wget
if [ $? -ne 0 ]; then
@@ -118,6 +128,8 @@ if [ ! -d $CLOUDFOUNDRY_HOME/vcap ]; then
echo "Unable to clone cloudfoundry repo."
exit 1
+ clear_bundler_settings
Please sign in to comment.
Something went wrong with that request. Please try again.