-
Notifications
You must be signed in to change notification settings - Fork 185
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
Cannot run ruby
with chruby
#491
Comments
Interesting, this is specific to macOS as there we need to use a real binary to circumvent the fact that macOS does not allow multiple levels of interpreters through execve() (see #154). In this case, the value passed to |
* Use Darwin-specific features to get the executable path reliably. * Rename to clarify this is only used on Darwin. * Fixes #491.
* Use Darwin-specific features to get the executable path reliably. * Rename to clarify this is only used on Darwin. * Fixes #491.
* Use Darwin-specific features to get the executable path reliably. * Rename to clarify this is only used on Darwin. * Fixes #491.
I opened PR #492 for a fix. As a workaround for GraalVM 0.27 you can: cd graalvm-0.27/jre/languages/ruby/bin
rm truffleruby
ln -s truffleruby.sh truffleruby
|
Awesome Benoit. Checked the patch with Darwin's docs, interesting how in C you need to call Confirm that the workaround works. |
Not so fast! :) RubyGems seems to generate executables with this shebang
Since the symlink makes that a shell script, it is not able to interpret Ruby:
If this gets too complicated do not worry, I can wait for the next version with #492 applied. |
Right, the workaround above does not fix the problem that macOS does not allow multiple levels of interpreters through execve, which notably happens when running gem binaries directly. |
* Use Darwin-specific features to get the executable path reliably. * Rename to clarify this is only used on Darwin. * Fixes #491.
I have GraalVM uncompressed under ~/graalvm-0.27 and ~/.rubies/truffleruby symlinked as documented in https://github.com/graalvm/truffleruby/blob/master/doc/user/ruby-managers.md#chruby and get this error:
chruby
is 0.3.9.Note that there is no intermediate shell script,
ruby
is resolved by Bash directly asand that file is a binary executable
Let me also add that invoking said binary using a full path works
The text was updated successfully, but these errors were encountered: