How to check if Ruby script is running via Bundler
1 answer
You can check defined?(Bundler)
, but it will also be present if you require 'bundler'
fail bundle exec
.
At startup, bundle exec
there are several variables inside ENV
that are not different. It is noteworthy that BUNDLE_GEMFILE
and BUNDLE_BIN_PATH
.
There are a few details in the Environment Modifications
bundle exec docs.
+5
source to share