Skip to content

Instantly share code, notes, and snippets.

@tonyc
Created March 4, 2020 16:53
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/aebfbe7f5b95ee0fb4796904601b3e86 to your computer and use it in GitHub Desktop.
Save tonyc/aebfbe7f5b95ee0fb4796904601b3e86 to your computer and use it in GitHub Desktop.
function lb() {
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