You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using nvim on different projects with different ruby versions is made harder when I have to go to the Mason installed binaries and update the shebang so the formatter/lsp/whatever works across ruby versions.
Passing the --env-shebang options allows me to run the package using the currently enabled ruby versions.
This actually breaks things for me when using rbenv. The shebang without this flag is #!/Users/william/.rbenv/versions/3.4.4/bin/ruby, which ends up executing the correct Ruby version no matter what version I currently have active. Using the #!/usr/bin/env ruby variant (this PR) it starts breaking because it executes with the wrong Ruby version.
I'm not really following how #!/usr/bin/env ruby would help things - wouldn't that just guarantee that this issue happens as soon as you swap Ruby versions?
I'll admit, my knowledge in this area is a quite hazy. But chruby works by shifting the PATH env to point at the correct ruby version (no shims) so I'm guessing using env binstubs means you'll always be picking up the appropriate version of ruby based on how the PATH has been set?
Perhaps the fundamental approach of rbenv requires different approaches here (?) Not sure. Might explain why I frequently have strange ruby issues around Mason tooling that I would have expected to be much more "visible" (I'm guessing more people still use "shim" approaches, such as rbenv, asdf or mise etc... than are using chruby?)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Using nvim on different projects with different ruby versions is made harder when I have to go to the Mason installed binaries and update the shebang so the formatter/lsp/whatever works across ruby versions.
Passing the
--env-shebangoptions allows me to run the package using the currently enabled ruby versions.Rubygems
gem installcommand-referenceCould fix this issue #1292