Update rubygems version on CI for go tests
In MR (!318 (merged)), I experienced a job failure due to failure to run bundle install
. Shows the following error:
$ bundle install
/usr/lib/ruby/2.5.0/rubygems.rb:284:in `find_spec_for_exe': Could not find 'bundler' (1.16.3) required by your /builds/gitlab-org/gitlab-shell/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:1.16.3`
from /usr/lib/ruby/2.5.0/rubygems.rb:303:in `activate_bin_path'
from /usr/local/bin/bundle:23:in `<main>'
According to this doc (https://bundler.io/blog/2019/05/14/solutions-for-cant-find-gem-bundler-with-executable-bundle.html), they need Rubygems 2.7.10 or 3.04 (or higher). golang:1.11
and golang:1.12
images have Rubygems 2.7.6.2.
To fix this, a step to run gem update --system
has been added for go
jobs. Also, rake
has been updated so bundle install
can successfully run. It can't because a gem called rainbow
(dependency of rubocop
) fails to install and rake
is its dependency.
Edited by Patrick Bajao