Better Ruby Gem caching on CircleCI

Ben Pickles
Nov 27, 2018 · 2 min read
steps:
- restore_cache:
keys:
- bundler-{{ checksum "Gemfile.lock" }}
- bundler-
No cache is found for key: bundler-7cHA+e+3dMj5o8KeEXzZWm_pWslivYO08S8xulWZ4gw=
Found a cache from build 513 at bundler-
Size: 66 MB
Cached paths:
* /home/circleci/app/vendor/bundle
- restore_cache:
keys:
- bundler-{{ checksum "Gemfile.lock" }}
- bundler-

- run: bundle install --clean --path vendor/bundle

- save_cache:
key: bundler-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle

Ben Pickles

Written by

Listener of Zappa • writer of Ruby and JavaScript • creator of https://github.com/benpickles/peity • leader of thought

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade