-
Notifications
You must be signed in to change notification settings - Fork 256
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
bin/bundle not present or working in bash for some RubyInstaller2 releases #299
Comments
@MSP-Greg Could you show what |
Actually it must be a CRuby bug, at least for the header if bin/bundle: https://bugs.ruby-lang.org/issues/18970 Does RubyInstaller2 do anything special about |
Yes, it hard codes the path in the bash binstub. Maybe the fix should be something packagers (Lars & myself) handle? I did look at this, and the question is how should bash binstubs behave if one has multiple Ruby installs. IOW, Ruby A is in PATH, but one runs the binstub in Ruby B? Or, should we just make all bash binstubs start with the following?
|
IMHO this never works properly (one need the given Ruby first in PATH, and using an absolute path to a binstub feels wrong anyway), and specifically it does not work for new executables installed by gems, which will just start with
I think so, yes. |
More findings on https://bugs.ruby-lang.org/issues/18970, notably 3.0.4 does not have |
What problems are you experiencing?
This is from ruby/setup-ruby#371.
bundle
does not work in a Bash shell on Windows -- without an extragem install bundler
--, and the reason is some RubyInstaller2 releases either do not ship with abin/bundle
, it has the wrong permissions and the wrong start.Steps to reproduce
I downloaded all latest releases from https://github.com/ruby/setup-ruby/blob/master/windows-versions.json and extracted them (I'm on Linux FWIW).
Of course only Ruby 2.7+ ships with Bundler, so for <=2.6 it's expected to be missing.
So only 3.1 and head have bin/bundle.
But those 2 bin/bundle do not have the executable bit set.
They also start like this which sounds invalid for Bash:
On https://github.com/eregon/setup-ruby/runs/7843304711?check_suite_focus=true we can see 3.0, 3.1 and head fail for
echo ~ && which -a bundle
in bash.2.7 avoids the issue in that CI run because the Bundler version is considered too old by setup-ruby and so
gem install bundler
is done there.This may be a CRuby issue, I am not sure (EDIT: most likely, I filed https://bugs.ruby-lang.org/issues/18970).
Maybe related to #180
mswin
also fails but that's a build from @MSP-Greg.bin/bundle
exists and is executable, but the contents looks not valid for Bash:mingw
anducrt
builds by @MSP-Greg do work, and theirbin/bundle
starts like:The text was updated successfully, but these errors were encountered: