Skip to content

Instantly share code, notes, and snippets.

@matthewrudy
Last active January 22, 2020 15:08
Show Gist options
  • Save matthewrudy/734d7a951eb87fb1a80c3e49c6388d3e to your computer and use it in GitHub Desktop.
Save matthewrudy/734d7a951eb87fb1a80c3e49c6388d3e to your computer and use it in GitHub Desktop.
Diff to make bundler 2 work on circleci.
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 37e192c..d639500 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -15,6 +15,7 @@ jobs:
ENABLE_REVIEW_APPS: true
BASIC_AUTH_USER: user
BASIC_AUTH_PASSWORD: password
+ BUNDLER_VERSION: 2.0.0
- image: circleci/postgres:11-alpine # 11
environment:
POSTGRES_USER: db-user
@@ -24,8 +25,8 @@ jobs:
- checkout # magic
- run:
- name: Which bundler?
- command: bundle -v
+ name: install bundler
+ command: gem install bundler --version $BUNDLER_VERSION
# Restore bundle cache
- restore_cache:
@@ -48,7 +49,7 @@ jobs:
- run:
name: Database setup
- command: bin/rails db:schema:load --trace
+ command: bundle exec bin/rails db:schema:load --trace
# Create test results directory
- run:
diff --git a/Gemfile.lock b/Gemfile.lock
index f9da86e..592b646 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -402,4 +402,4 @@ RUBY VERSION
ruby 2.6.0p-1
BUNDLED WITH
- 1.17.2
+ 2.0.0
@matthewrudy
Copy link
Author

You need to use bundle exec for all commands,
otherwise it'll use the wrong version of bundler, and break.

@sibelius
Copy link

should you update the gist?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment