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

RubyGems install errors #7496

Open
sporkd opened this issue Oct 1, 2024 · 5 comments
Open

RubyGems install errors #7496

sporkd opened this issue Oct 1, 2024 · 5 comments

Comments

@sporkd
Copy link

sporkd commented Oct 1, 2024

If you happen to have an existing bundler at /usr/local/bin/bundle, then pkgx rubygems install fails with:

Screenshot 2024-10-01 at 8 55 50 AM

This seems very wrong because pkgx doesn't even install anything to /usr/local. So having an old bundle binary lying around shouldn't cause rubygems install to fail.

But come to think of it, I've experienced a lot of weird things using pkgx rubies that cause subtle bundle install issues, and I suspect this faulty gem home might be the root of it. Inside a pkgx project when I run gem env it has /usr/local in my gem path:

Screenshot 2024-10-01 at 10 12 11 AM

And it carries through to your bundle env as well:

Screenshot 2024-10-01 at 10 13 15 AM

The value for Gem Home above should be whatever pkgx ruby -e 'puts Gem.user_dir' evaluates to.

Not sure what's happening, but I suspect pkgx rubygems needs to be more tightly coupled to pkgx ruby.

@sporkd sporkd changed the title rubygems install error RubyGems install errors Oct 1, 2024
@jhheider
Copy link
Contributor

jhheider commented Oct 1, 2024

there's a lot of path manipulation being done in the recipes for ruby-lang.org and rubygems.org to try and keep them both isolated and working. if you're a dab hand at ruby, perhaps you can figure out what piece is missing to make it all tick.

@sporkd
Copy link
Author

sporkd commented Oct 1, 2024

Can take a look at it @jhheider. I imagine it's something to do with this comment. Do you know the reason this was needed?

@jhheider
Copy link
Contributor

jhheider commented Oct 1, 2024

I don't offhand. It's likely darwin-focused, since that's our primary development platform. You could try just adding an if: darwin to that stanza and see if it helps you.

@sporkd
Copy link
Author

sporkd commented Oct 1, 2024

Well @jhheider. I'm on darwin as well, and that's where the install error I posted above is happening. It can be replicated on darwin with:

sudo touch /usr/local/bin/bundle
pkgx install rubygems.org@latest

However, it does only appear to be an issue with pkgx install name@version, not pkgx name@version in case that helps.

One other question. Why the discrepancy between these two ways of calling pkgx without install?

Screenshot 2024-10-01 at 4 14 11 PM

@jhheider
Copy link
Contributor

jhheider commented Oct 1, 2024

Ah, yeah. The install scripts are a little more fragile. That's possibly something we should move to pkgxdev/pkgx for exploration.

For invocation, gem@latest is a provides:. The latter would need to be pkgx +rubygems.org@latest gem --version. Packages don't have default binaries.

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

2 participants