As per https://github.com/zendesk/samson/issues/2744 the PATH variable leaks into our jobs and this can impact using rbenv.
When samson is launched with bundle exec puma, it prepends the directory /var/www/samson/releases/1/vendor/bundle/ruby/2.5.0/bin to the PATH.
It appears this issue was introduced in 2bf25bdfb123b4e12997ee3e49e7eee5789b955c
Previously we were calling:
Bundler.with_clean_env do
PTY.spawn(...)
end
This strips the path prepended by bundle exec and hence avoids conflicts with rbenv.
Should we re-introduce Bundler.with_clean_env to strip the PATH?
As per https://github.com/zendesk/samson/issues/2744 the PATH variable leaks into our jobs and this can impact using rbenv. When samson is launched with
bundle exec puma
, it prepends the directory/var/www/samson/releases/1/vendor/bundle/ruby/2.5.0/bin
to the PATH.It appears this issue was introduced in 2bf25bdfb123b4e12997ee3e49e7eee5789b955c Previously we were calling:
This strips the path prepended by
bundle exec
and hence avoids conflicts with rbenv.Should we re-introduce
Bundler.with_clean_env
to strip the PATH?cc @grosser