Skip to content

Don't commit .bundle or vendor/bundle into update branches#4

Merged
neilvcarvalho merged 2 commits into
mainfrom
nc/unstage-bundle-files
May 16, 2026
Merged

Don't commit .bundle or vendor/bundle into update branches#4
neilvcarvalho merged 2 commits into
mainfrom
nc/unstage-bundle-files

Conversation

@neilvcarvalho
Copy link
Copy Markdown
Member

`git add -A` was staging bundler files that `ruby/setup-ruby` writes into the workspace (.bundle/config, vendor/bundle/). These got committed into the first importmap branch. On the next checkout back to origin/main, git deleted them — and with the bundle path config and cached gems gone, subsequent `bin/importmap pin` calls failed with "Could not find gems".

Unstaging both paths after `git add -A` keeps the commits clean and leaves bundler's environment intact across branch switches.

\`git add -A\` was staging bundler files that \`ruby/setup-ruby\` writes
into the workspace (.bundle/config, vendor/bundle/). These got
committed into the first importmap branch. On the next checkout back
to origin/main, git deleted them — and with the bundle path config and
cached gems gone, subsequent \`bin/importmap pin\` calls failed with
"Could not find gems".

Stage only the paths \`bin/importmap pin\` is expected to modify:
\`config/importmap.rb\` and \`vendor/javascript/\` (for vendoring mode).
@neilvcarvalho neilvcarvalho force-pushed the nc/unstage-bundle-files branch from 6d4f577 to 8efe959 Compare May 15, 2026 19:47
@neilvcarvalho neilvcarvalho merged commit 526fbd4 into main May 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant