Skip to content

Instantly share code, notes, and snippets.

@tonyc
Created January 28, 2020 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tonyc/22d81388631fc933fefde3b662623066 to your computer and use it in GitHub Desktop.
Save tonyc/22d81388631fc933fefde3b662623066 to your computer and use it in GitHub Desktop.
function local_bundle() {
local_bundle_ver=$(grep -A1 "BUNDLED WITH" Gemfile.lock | grep -v BUNDLED | tr -d '[:space:]')
if [ -n "$local_bundle_ver" ]; then
echo "Using bundler ${local_bundle_ver}"
bundle _${local_bundle_ver}_ $*
else
echo "Could not determine correct version of bundler to use. Sorry!"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment