Workaround for installing correct version of ruby bundler

See https://github.com/bundler/bundler/issues/6870

Bundler 2.x dropped support for Ruby < 2.3 so now we detect ruby
version and install last known to work version. This means that
newer OS will get newer versions of bundler.

Change-Id: I521affb16d8d2312be3ff507a014adddacd6cb8b
Closes-Bug: #1810401
This commit is contained in:
Tobias Urdin 2019-01-09 15:35:53 +01:00
parent 6ec17c9a16
commit 6185377713
1 changed files with 7 additions and 1 deletions

View File

@ -24,6 +24,12 @@ install_gems() {
sed -i "/.*ref[[:space:]]*=> 'stable\/.*/d" Gemfile
# Install dependencies
gem install bundler --no-rdoc --no-ri --verbose
ruby <<EOF
cmd = 'gem install bundler --no-rdoc --no-ri --verbose'
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.3.0') then
cmd += ' -v 1.17.3'
end
system(cmd)
EOF
$GEM_HOME/bin/bundle install
}