vagrant
https://github.com/mitchellh/vagrant
Ruby
Vagrant is a tool for building and distributing development environments.
Vagrant::Util::Env.with_clean_env
Execute the given command, removing any Ruby-specific environment variables. This is an "enhanced" version of `Bundler.with_clean_env`, which only removes Bundler-specific values. We need to remove all values, specifically: - _ORIGINAL_GEM_PATH - GEM_PATH - GEM_HOME - GEM_ROOT - BUNDLE_BIN_PATH - BUNDLE_GEMFILE - RUBYLIB - RUBYOPT - RUBY_ENGINE - RUBY_ROOT - RUBY_VERSION This will escape Vagrant's environment entirely, which is required if calling an executable that lives in another Ruby environment. The original environment restored at the end of this call.
Edit
git clone [email protected]:mitchellh/vagrant.git
cd vagrant
open lib/vagrant/util/env.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Vagrant--Util--Env-with_clean_env-for-pr
# Commit to gitgit add lib/vagrant/util/env.rbgit commit -m "better docs for Vagrant::Util::Env.with_clean_env"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Vagrant--Util--Env-with_clean_env-for-pr
hub pull-request
# Celebrate!