Ruby's docker images (e.g. ruby:2.6.3) use bundler v1 (e.g. 1.17.3
), see: docker-library/ruby#268 (comment)
When bundling with bundler v2 locally it can lead to the the following exception:
Could not find 'bundler' (2.0.2) required by your /app/Gemfile.lock. (Gem::GemNotFoundException)
Solve this by using the correct bundle version locally:
gem install bundler -v 1.17.3