-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[Bug]: gem
can't load relative dependencies
#20359
Comments
Could you please explain what |
@Grimler91 In ruby In # ...
require_relative "rubygems/compatibility"
require_relative "rubygems/defaults"
require_relative "rubygems/deprecate"
# ... It expects that the But in android 10 |
I think we need a new tag for tracking this issue |
I guess then that this is something that will be solved when/if we update Termux to be android >= 10 compatible. See @agnostic-apollo's docs on the subject. Maybe it is possible to patch ruby's require_relative to handle both types of prefix'es. I guess it is unlikely that anyone here will work on that though, since Termux targets a lower targetSdkVersion and is unaffected |
There seem to be related upstream issues as well, realpath is apparently used to prevent double loading of files. Ideally, they should fix it, however, we could patch too, i.e if file being executed has a symlink target under https://bugs.ruby-lang.org/issues/16978 I'll add this issue to the docs, thanks for that!. Copying the script file to |
@agnostic-apollo Thank you so much for your help! I was able to add a little patch to get through this issue. The I have documented it in this repo here and also added a demo for default Maybe it is not relevant right now as termux doesn't itself support android 10 but do you think making a PR for such a fix to this repo would be any good? A patch for |
Problem description
Hi team, I have custom prefix packaged bootstraps built for android10. I install them on a local fork of the termux-app where I've changed the package name. All packages in the bootstrap work good so far, except the
gem
tool.Upon inspecting the bootstrap zip I do find the relevant file under
/lib/ruby/3.2.0/rubygems/
. But since it is arequire_relative
directive, I suppose the path isn't being found under app's file structure. Maybe there needs to be symlinks for it too.What steps will reproduce the bug?
Build the bootstrap with required packages for
ruby
using:What is the expected behavior?
In the original non-android10 termux app, the command works fine.
System information
Not sure if applicable.
The text was updated successfully, but these errors were encountered: