Skip to content

Commit

Permalink
Workaround for installing correct version of ruby bundler
Browse files Browse the repository at this point in the history
See rubygems/bundler#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
(cherry picked from commit 6185377)
  • Loading branch information
tobias-urdin committed Jan 11, 2019
1 parent c169863 commit 9b6f1e1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion functions
Expand Up @@ -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
}

0 comments on commit 9b6f1e1

Please sign in to comment.