Apparently gem installs bundler in $HOME, not in $GEM_HOME like we
expected. The broken code continued working as long as it was using a
pre-existing run-tests temp dir that also installed a version of
bundler in $GEM_HOME because bundler was listed in a Gemfile.lock.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>
echo "Will install dependencies to $(gem env gemdir)"
echo "Will install bundler and arvados gems to $tmpdir_gem_home"
echo "Gem search path is GEM_PATH=$GEM_PATH"
echo "Will install dependencies to $(gem env gemdir)"
echo "Will install bundler and arvados gems to $tmpdir_gem_home"
echo "Gem search path is GEM_PATH=$GEM_PATH"
- bundle="$tmpdir_gem_home/bin/bundle"
- bundlers="$(gem list --details bundler)"
versions=(2.2.19)
for v in ${versions[@]}; do
versions=(2.2.19)
for v in ${versions[@]}; do
- if ! echo "$bundlers" | fgrep -q "($v)"; then
+ if ! gem list --installed --version "${v}" bundler >/dev/null; then
gem install --no-document --user $(for v in ${versions[@]}; do echo bundler:${v}; done)
break
fi
gem install --no-document --user $(for v in ${versions[@]}; do echo bundler:${v}; done)
break
fi