Set --bindir when installing bundle

... because recent gem ignores $GEM_HOME to decide the place to which
it install bin files, and we need to set it explicity to have bundle
command installed in $GEM_HOME/bin.

Change-Id: I3a381d43429fbf2b7ae6d90ff7a2bc3018b4a41d
Related-bug: #1866176
This commit is contained in:
Takashi Kajinami 2020-03-27 10:19:14 +09:00
parent 881bd9d2f9
commit b0aff3d5c2
1 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@
install_gems() {
mkdir .bundled_gems
export GEM_HOME=`pwd`/.bundled_gems
export GEM_BIN_DIR=$GEM_HOME/bin
# use puppet-nova to test the gem
if [ -d /home/zuul/src/opendev.org/openstack/puppet-nova ]; then
@ -25,7 +26,7 @@ install_gems() {
# Install dependencies
ruby <<EOF
cmd = 'gem install bundler --no-rdoc --no-ri --verbose'
cmd = 'gem install bundler --no-rdoc --no-ri --verbose --bindir=${GEM_BIN_DIR}'
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.3.0') then
cmd += ' -v 1.17.3'
end