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

Mention a fallback for chruby users if project doesn't have .ruby-version #701

Merged
merged 1 commit into from
Sep 22, 2023

Conversation

st0012
Copy link
Member

@st0012 st0012 commented Jul 17, 2023

Motivation

For chruby users, working on projects without .ruby-version (e.g. /ruby/irb) would cause Ruby LSP fail to start. A workaround for that is to have .ruby-version at a level above (e.g. /ruby/.ruby-version). But this information is not widely known.

Implementation

Add note to the version manager section to explain this.

@st0012 st0012 added the documentation Improvements or additions to documentation label Jul 17, 2023
@st0012 st0012 added this to the 2023-Q3 milestone Jul 17, 2023
@st0012 st0012 requested a review from a team as a code owner July 17, 2023 14:42
@st0012 st0012 self-assigned this Jul 17, 2023
@st0012 st0012 requested review from andyw8 and Morriar July 17, 2023 14:42
@st0012 st0012 force-pushed the mention-ruby-version-hack branch from 7dec123 to bc1a396 Compare July 17, 2023 14:43
Copy link
Member

@vinistock vinistock left a comment

Choose a reason for hiding this comment

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

Do you think it makes sense to put this in a new markdown file for version managers?

Then we can aggregate all information there for different options.

@st0012
Copy link
Member Author

st0012 commented Jul 17, 2023

Do we have information for other managers?
I personally want to keep these kind of info at README until we're out of space, because it's very critical for users' experience with the tool and should be the easiest to find.

@vinistock
Copy link
Member

There's interest from people using rtx #668. How about we add a link from the README?

Something like

For version manager specific instructions and tips, see [blah]()

README.md Outdated Show resolved Hide resolved
README.md Outdated
Comment on lines 62 to 66
> **Note**
>
> If you use `chruby` but don't have `.ruby-version` in a project, you can add `.ruby-version` to its parent folder
> as a fallback.
> For example, if `/projects/my_project` doesn't have `.ruby-version`, `chruby` would read `/projects/.ruby-version` instead.

Copy link
Member

Choose a reason for hiding this comment

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

Can we move this into a chruby section in the VERSION_MANAGERS.md file?

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you agree with moving the entire custom activation section there too?
Currently VERSION_MANAGERS is an extension of it, so I feel a bit weird putting non-custom activation content here.

It'll be like

...

To make sure that the Ruby LSP can find the version manager scripts, make sure that they are loaded in the shell's
configuration script (e.g.: ~/.bashrc, ~/.zshrc) and that the SHELL environment variable is set and pointing to the
default shell.

For manager-specific notes and how to set up custom activation for managers that are not listed above, please see [version managers](VERSION_MANAGERS.md)

Copy link
Member

Choose a reason for hiding this comment

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

Yes, but let's at least mention custom activation in the README and link to the file, so that it's discoverable.

README.md Outdated Show resolved Hide resolved
VERSION_MANAGERS.md Outdated Show resolved Hide resolved
VERSION_MANAGERS.md Outdated Show resolved Hide resolved
VERSION_MANAGERS.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
VERSION_MANAGERS.md Show resolved Hide resolved
VERSION_MANAGERS.md Show resolved Hide resolved
…version`

Apply suggestions from code review

Co-authored-by: Andy Waite <13400+andyw8@users.noreply.github.com>
@st0012 st0012 merged commit 8c680e9 into main Sep 22, 2023
5 checks passed
@st0012 st0012 deleted the mention-ruby-version-hack branch September 22, 2023 19:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants