I've written the same article in Japanese.
bundler 2.x has been released on Jan 4th 2019.
BUNDLED WITH
in Gemfile.lock
is rewritten when you run bundle update
with bundler 2.x in your machine.
$ bundle update
•••
$ git diff
•••
BUNDLED WITH
- 1.17.3
+ 2.0.1
This change would make some problems on CircleCI and production environment etc.
Solution A: Downgrade the bundler
Check the current version
$ cat Gemfile.lock | grep "BUNDLED WITH" -A 1
BUNDLED WITH
2.0.1
Recreate Gemfile.lock with the older version
$ gem install bundler -v 1.17.3
$ rm Gemfile.lock
$ bundle 1.17.3 install
Confirm
$ cat Gemfile.lock | grep "BUNDLED WITH" -A 1
BUNDLED WITH
1.17.3
Solution B: Change the bundler version in the environment.
- Set any version as
BUNDLER_VERSION
- Reinstall the bundler
version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: circleci/ruby:2.6.0-node-browsers
environment:
# 1
BUNDLER_VERSION: 2.0.1
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/postgres:9.4
working_directory: ~/repo
steps:
- checkout
# 2
- run:
name: setup bundler
command: |
sudo gem update --system
sudo gem uninstall bundler
sudo rm /usr/local/bin/bundle
sudo rm /usr/local/bin/bundler
sudo gem install bundler
# •••
- run:
name: install dependencies
command: |
bundle install --jobs=4 --retry=3 --path vendor/bundle
Top comments (0)