-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(docs): Update ruby install instructions in environment setup readme #11714
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
f29329d
to
8a84df2
Compare
It is expected that a MetaMask contributor picks a version manager of their choice, and follows the version manager documentation to install and configure it on their system.
We should keep from being prescriptive on how to configure tools that are not maintained by us. |
@joaoloureirop Would it help to add language emphasizing that the The primary target of this readme section probably isn't developers who have already set up ruby version managers themselves and don't need the instructions. Shouldn't it be a priority to unblock non-users of ruby by using the most obvious and unambiguous language possible? |
FWIW there is also the option of the repository
(taken to the next level: https://github.com/legobeat/l7-devenv)
I think it should also be a priority to steer developers towards secure solution and setups they can control. (No shade on rbenv or using it the proposed way) I do think there are risks with the approach, though, specifically considering the undeterministic mess that CocoaPods have become.. By steering towards a specific blessed setup, we kind of take responsibility for that being Good Enough. So kind of agree with @joaoloureirop
Both sound like nice improvements to me! |
We could expand this section to offer better guidance to new contributors unfamiliar with the tool.
The concern is with new contributors getting familiar with this tool since it will require intervention every time our We want to help new contributors as much as possible, and in this case, the best help is redirecting them to the official documentation. For example, if a new contributor decides to use the version manager mentioned in our docs they can follow the hyperlink provided and go through the installation guide, which is only two steps when using a package manager ( The most important part that is often overlooked is to set up the shell to load the version manager. Down the road when intervention is needed (installing a new ruby version, rehashing, removing...), the official documentation is the best help they can get. |
6c506f6
to
7e51112
Compare
7e51112
to
385a936
Compare
It is recommended to install a ruby version manager, and use it to install the ruby version defined in the file `.ruby-version`. | ||
|
||
Install ruby version defined in the file `.ruby-version` | ||
For example, the following commands will [install `rbenv`](https://github.com/rbenv/rbenv?tab=readme-ov-file#installation) and use it to [install the configured ruby version](https://github.com/rbenv/rbenv#installing-ruby-versions): | ||
|
||
```bash | ||
brew install rbenv | ||
rbenv init | ||
rbenv install | ||
rbenv local # if installation is successful, this will print the installed ruby version. | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joaoloureirop @legobeat Thanks for the feedback! I understand the need to avoid endorsing a specific version manager, but feel like the reservations around providing instructions...
it will require intervention every time our .ruby-version changes.
Down the road when intervention is needed (installing a new ruby version, rehashing, removing...), the official documentation is the best help they can get.
... might apply to any external package we don't manage but provide instructions for in our readmes.
I attempted a rewrite but I'm not sure how well it addresses your concerns. If either of you have suggestions around adding stronger disclaimer language or editing/removing the additions I'd be happy to apply them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... might apply to any external package we don't manage but provide instructions for in our readmes.
Instructions should be provided in our readmes when the configuration differs from the default or when the official docs miss the installation/configuration guide.
Other than that, official docs should be the single source of truth.
the node version manager section is as vague as the ruby version manager section for the same reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the added value here that the official docs don't already provide?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Providing immediate, explicit, unambiguous instructions would hopefully serve as a better first line of defense against troubleshooting threads like these, some of them quite huge:
- https://consensys.slack.com/archives/C02U025CVU4/p1729086334814599?thread_ts=1728571415.206109&cid=C02U025CVU4
- https://consensys.slack.com/archives/C02U025CVU4/p1724357838719499?thread_ts=1717610381.685139&cid=C02U025CVU4
- https://consensys.slack.com/archives/C02U025CVU4/p1722369858678939?thread_ts=1722019463.898419&cid=C02U025CVU4
- https://consensys.slack.com/archives/CBW7S9FSN/p1695241220126889?thread_ts=1695228967.143599&cid=CBW7S9FSN
- Edit: https://consensys.slack.com/archives/C02U025CVU4/p1732190183284219
- https://consensys.slack.com/archives/C02U025CVU4/p1728496388117329 (also linked in PR description above)
If our internal developers (myself included) have this much trouble with the current instructions for this step I don't think the situation will be much better for external contributors.
In the end I guess this comes down to the question of what's a higher priority for a readme: being correct or being helpful.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #11714 +/- ##
==========================================
+ Coverage 54.27% 54.54% +0.27%
==========================================
Files 1711 1743 +32
Lines 38712 39317 +605
Branches 4738 4870 +132
==========================================
+ Hits 21010 21446 +436
- Misses 16253 16376 +123
- Partials 1449 1495 +46 ☔ View full report in Codecov by Sentry. |
Quality Gate passedIssues Measures |
Closing as wont-fix. |
Description
The current ruby install instructions in the "Environment Setup" readme are vague, and may cause
gem
to be run with the system root installation.This commit updates the instructions with commands that fix this issue.
Related issues
Manual testing steps
Screenshots/Recordings
Pre-merge author checklist
Pre-merge reviewer checklist