I want to run the tests after every commit. When installing the bundler, however, the following error message appears: "You must use Bundler 2 or greater with this lockfile" although I install version 2.2.5
stages:
- test
test-job:
stage: test
image: ruby:2.5.1
script:
- gem install bundler -v 2.2.5
- bundle install
- bundle exec rails test
bundler 1.16.6 is included in ruby:2.5.1 and is used per default as you can see here:
$ gem list bundler
bundler (2.2.5, 1.16.6, default: 1.16.2)
Try this instead:
test-job:
stage: test
image: ruby:2.5.1
before_script:
- gem update --system
script:
- bundle install
- bundle exec rails test