Skip to content

Instantly share code, notes, and snippets.

@colby-swandale
Last active September 16, 2018 11:25
Show Gist options
  • Save colby-swandale/cd51b458df2a7755b2a2810269190ac4 to your computer and use it in GitHub Desktop.
Save colby-swandale/cd51b458df2a7755b2a2810269190ac4 to your computer and use it in GitHub Desktop.
def set_bundle_variables
begin
ENV["BUNDLE_BIN_PATH"] = Bundler.rubygems.bin_path("bundler", "bundle", VERSION)
rescue Gem::GemNotFoundException
ENV["BUNDLE_BIN_PATH"] = File.expand_path("../../../exe/bundle", __FILE__)
end
# Set BUNDLE_GEMFILE
ENV["BUNDLE_GEMFILE"] = find_gemfile.to_s
ENV["BUNDLER_VERSION"] = Bundler::VERSION
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment