Cleanup cache after `bundle install`
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, ruby
Research direction
The issue does not name files or tests; start by tracing setup-ruby’s action configuration and the bundle install flow. Determine where an opt-in cache-pruning setting belongs, then verify that enabled installs remove the specified cache paths while default behavior remains unchanged.
Written by the indexing model from the issue text.
Description
Hi, I noticed that the cache size is double what all gems in my project weigh. It seems like it's due to ${BUNDLE_PATH}/ruby/*/cache/*.gem files. But I don't think we need them after bundle install is finished. Or am I missing something?
I was thinking about adding a config param like prune-bundle-cache: true that would run rm -rf ${BUNDLE_PATH}/ruby/*/cache after bundle install
Rails already does it https://github.com/rails/rails/blob/9e9f80778abb38b8d884d456594d6b6fa683c773/railties/lib/rails/generators/rails/app/templates/Dockerfile.tt#L57
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git
WDYT?
- Dominant language
- JavaScript
- Stars
- 990
- Forks
- 369
- Avg merge
- 18m
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ruby/setup-ruby
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
ruby/setup-ruby#818 · 6 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
ruby/setup-ruby#801 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
ruby/setup-ruby#791 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ruby/setup-ruby#752 · 12 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 38/100
ruby/setup-ruby#673 · 3 comments · 1 reaction ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
docToolchain/docToolchain#1705 ·
-
Timezone select lists one option per character; duplicate "Failed" reason; shared tracker popover id Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
nightscout/nocturne#1414 ·
-
bug v2
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
modelcontextprotocol/inspector#2458 · 1 comment ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
carbon-design-system/ibm-products#9907 ·