Consider to make the `Gem.default_path` more static
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 4k
- Forks
- 1.9k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 81
Description
The current implementation of Gem.default_path is quite dynamic:
It does not include user_dir and vendor_dir under some conditions, mainly if the directories are not present on the filesystem. That IMHO makes information about versatility of RubyGems more obscure.
Therefore I propose to make the Gem.default_path more static, starting by removing the directory existence check.
Please note that this ticket is based on discussion in https://github.com/rubygems/rubygems/pull/7187#issuecomment-1825533283
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in lib/rubygems/defaults.rb around lines 175-181 and read the discussion linked from pull request 7187. Check how Gem.default_path currently handles user_dir and vendor_dir, then remove the directory-existence condition as proposed. Done means the default path is static and includes those directories under the relevant conditions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100