Cleanup build script environment (PATH, GEM_PATH, ...) before run?
I'm currently running into issues where I'm running gitlab-ci-runner using the system ruby and the builds themselves using rbenv rubies.
When I run gem environment
inside the build, it shows the rbenv GEM_PATH
s and the private bundler gem path of gitlab-ci-runner. This leads to confusion and (in some cases) segfaults when ruby 2.1 tries to use a gem compiled for 1.9.3 :-/
using unset GEM_PATH
in the build script mitigates that but shouldn't that be the job of the runner?