Skip to content

Re-regenerate global binstubs when Ruby version changes - #4177

Open
vinistock wants to merge 2 commits into
mainfrom
vs_regen_bin_stubs
Open

Re-regenerate global binstubs when Ruby version changes#4177
vinistock wants to merge 2 commits into
mainfrom
vs_regen_bin_stubs

Conversation

@vinistock

@vinistock vinistock commented Jul 27, 2026

Copy link
Copy Markdown
Member

Motivation

RubyGems installs executable binstubs that sometimes bake the Ruby version. When the Ruby version for the project is updated, if the version manager reuses that path for any reason, we crash on boot because the baked version doesn't match the one actually being used.

Implementation

The fix is to invoke gem pristine ruby-lsp --only-executables --env-shebang when Ruby gets upgraded. To achieve that, we need to remember a slightly more complex update state, so that this is triggered not only when a certain amount of time passed, but when Ruby gets an upgrade too.

FYI: I cut v0.10.5-preview to test out the changes before cutting a stable release.

@vinistock vinistock self-assigned this Jul 27, 2026
@vinistock
vinistock requested a review from a team as a code owner July 27, 2026 17:27
@vinistock vinistock added bugfix This PR will fix an existing bug vscode This pull request should be included in the VS Code extension's release notes labels Jul 27, 2026

@larister larister left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for sorting this @vinistock!

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

Labels

bugfix This PR will fix an existing bug vscode This pull request should be included in the VS Code extension's release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants