`bundle platform` doesn't indicate that BUNDLE_FORCE_RUBY_PLATFORM is in effect, and neither does anything else
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 4k
- Forks
- 1.9k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 81
Description
Describe the problem as clearly as you can
We recently had a difficult to diagnose problem.
The summary of the issue is this:
- Running on an arm based laptop
- A repo had
.bundle/configwith BUNDLE_FORCE_RUBY_PLATFORM set - A gem was added to the repo which had a ruby-platform version, but the ruby-platform version had an amd64 binary in it
- Bundler was installing the incorrect version of the gem
Did you try upgrading rubygems & bundler?
Yep
Which command did you run?
In diagnosing the problem, we ran bundle platform and ruby -e "puts Gem::Platform.local", but they both emitted the expected arm64, even though BUNDLE_FORCE_RUBY_PLATFORM was set to true.
What were you expecting to happen?
The situation is incredibly obscure, but I think looking back to it I would have expected bundle platform to:
- warn about the config override
- or say that it would have installed the ruby platform as configured
What actually happened?
> bundle platform
Your platform is: arm64-darwin-24
Your app has gems that work on these platforms:
* aarch64-linux
* arm-linux
* arm64-darwin
* ruby
* x86-linux
* x86_64-darwin
* x86_64-linux
Your Gemfile specifies a Ruby version requirement:
* ruby 3.3.0
Your current platform satisfies the Ruby version requirement.
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 at the bundle platform command and trace how BUNDLE_FORCE_RUBY_PLATFORM is read alongside Gem::Platform.local. Compare the platform it reports with the platform used for installation, then define how the override should be surfaced; done means this arm64/amd64 scenario is no longer misleading.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100