Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Fix alternative Ruby activation#851

Merged
vinistock merged 2 commits intomainfrom
vs/fix_alternative_ruby_activation
Oct 19, 2023
Merged

Fix alternative Ruby activation#851
vinistock merged 2 commits intomainfrom
vs/fix_alternative_ruby_activation

Conversation

@vinistock
Copy link
Copy Markdown
Member

Motivation

Closes Shopify/ruby-lsp#1724

When someone specifies a custom bundle gemfile in order to use a Ruby version different than their project, we need to read the .ruby-version file from the directory where the custom bundle exists.

Additionally, we need to use the correct directory when fetching Ruby information or else we end up activating the correct Ruby version, but displaying the wrong one in the status item.

Implementation

Put the cwd in a property and started using it everywhere we need it.

@vinistock vinistock added the bugfix This PR will fix an existing bug label Oct 19, 2023
@vinistock vinistock added this to the 2023-Q3 milestone Oct 19, 2023
@vinistock vinistock self-assigned this Oct 19, 2023
@vinistock vinistock requested a review from a team as a code owner October 19, 2023 19:35
@vinistock vinistock requested review from Morriar and st0012 October 19, 2023 19:35
Comment thread src/ruby.ts Outdated
Co-authored-by: Ufuk Kayserilioglu <ufuk.kayserilioglu@shopify.com>
@vinistock vinistock merged commit 8b2850c into main Oct 19, 2023
@vinistock vinistock deleted the vs/fix_alternative_ruby_activation branch October 19, 2023 21:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bugfix This PR will fix an existing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trying to work with a custom gemfile doesn`t work

2 participants