Skip to content
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

truffleruby gem: a few things, as well as HOME_DIR/.gem issues #2699

Open
rubyFeedback opened this issue Aug 4, 2022 · 0 comments
Open

truffleruby gem: a few things, as well as HOME_DIR/.gem issues #2699

rubyFeedback opened this issue Aug 4, 2022 · 0 comments

Comments

@rubyFeedback
Copy link

Recently I found out that truffleruby will be installed into a graalvm
directory I created. So the following works in theory:

/home/Programs/Graalvm/22.2.0/languages/ruby/bin/gem install libui

I install everything under /home/Programs/. Including versioned
directories so I don't even need a "package manager", the filesystem
acts as surrogate here. And symlinks are used for compaibility.

Anyway. The first thing I noticed ... "gem" from truffleruby seems to
be slow. I have to wait several seconds before it tells me
anything. Whereas:

/home/Programs/Graalvm/22.2.0/languages/ruby/bin/ruby

aka the ruby binary used by truffleruby works fine without any
delays I have noticed. This may be a minor thing, I Just report
it.

Next I get this:

The gem directories are not configured properly.
The gem install directory /root/.gem is not correct.
It has to be marked with the truffleruby_gem_dir_marker.txt file as belonging to TruffleRuby.
The gem might be installed into a gem directory belonging to another Ruby implementation.
Continue installing? [Yn]  
The gem directories are not configured properly.
The gem install directory /root/.gem is not correct.
It has to be marked with the truffleruby_gem_dir_marker.txt file as belonging to TruffleRuby.
The gem might be installed into a gem directory belonging to another Ruby implementation.
Continue installing? [Yn]  

No clue why it is showing the above twice. I think it should only show it once.

As said I used the following command:

/home/Programs/Graalvm/22.2.0/languages/ruby/bin/gem install libui

So really no idea why it reports it twice. But this may be a minor thing.

Now the more important issue. The /root/.gem dir I can not change and
give to truffleruby; Cruby MRI is in control of that. Tons of bindings I
have to use, ruby-gtk3 and so forth. No way I can give that directory
to truffleruby.

But then I was thinking ... IF truffleruby already uses a .txt file, how
about being able to specify another directory there too? And letting
users know?

For instance I would like to designate:

/root/.trufflegem/

That way truffleruby could use that directory just fine as-is.

Perhaps this could even be via a commandline flag. Or simply
specified in the .txt file as-is.

I could in theory delete .gem and let truffleruby handle that
but I also read that the compatibility is not 100% and I can
not switch when issues may arise. But I'd like to help with
testing, so using .trufflegem rather than .gem would be
a neat compromise. This does not have to be the default,
mind you, so nobody has to change this - but it could be
nice if .txt allows for this and mentions it either on the
commandline or perhaps on the wiki or somewhere
where we may read up on that. Thanks for reading
either way! I didn't know we could use GraalVM's ruby
like a real ruby replacement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant