Fix RUBYGEMS_GEMDEPS with global gem
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 4k
- Forks
- 1.9k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 81
Description
My current problem is that I can't use RUBYGEMS_GEMDEPS with a globally installed gem for current project. Best I can tell is that this issue is somewhat related to this earlier issue.
Steps to Recreate:
- Per the 3.2.26 release notes, add
export RUBYGEMS_GEMDEPS=-to your global shell. - Clone and change directory to the root of a Ruby project like Sublime Text Setup, for example.
- Install a gem like, Milestoner as a global gem.
- Try running
milestoner --statusfrom the root of the Sublime Text Setup project, you'll then get the following error:
/Users/bkuhlmann/.cache/frum/versions/3.0.2/lib/ruby/site_ruby/3.0.0/bundler/rubygems_integration.rb:362:in `block in replace_bin_path': can't find executable milestoner for gem milestoner. milestoner is not currently included in the bundle, perhaps you meant to add it to your Gemfile? (Gem::Exception)
from /Users/bkuhlmann/.cache/frum/versions/3.0.2/lib/ruby/site_ruby/3.0.0/bundler/rubygems_integration.rb:390:in `block in replace_bin_path'
from /var/folders/j1/szrwbp9d1jg351ghw4f7bcym0000gn/T/frum_77591_1629336054529/bin/milestoner:25:in `<main>'
I'm using Frum as my Ruby Version Manager. Even though Milestoner is installed as a global gem but not defined in my Sublime Text Project, I don't think the above error should show up, right?
This issue is related to:
- Network problems
- Installing a library
- Publishing a library
- The command line
gem - Other
Here are my current environment details:
$ gem env version
3.2.26
I will abide by the code of conduct.
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
Reproduce the failure with RUBYGEMS_GEMDEPS=-, a global Milestoner installation, and the Sublime Text Setup project. Start at bundler/rubygems_integration.rb lines 362 and 390, then trace how the milestoner entry point is resolved when the gem is outside the project bundle. Done means the global executable runs from the project without the current Gem::Exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100