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
[Experimental] Add gem exec
command to run executables from gems that may or may not be installed
#6309
Conversation
6aa3de8
to
43d8873
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is so much faster than I expected. Nice work.
One open question: when you run gem exec rails
or gem exec rspec
, the actual command is coming from a dependency of the gem with the name (railties and rspec-core, respectively). When I tested, it seemed like gem exec rspec
did not fetch the newest version of rspec-core, and I had to run gem exec -g rspec-core rspec
to get the newest version installed and then run. Should we expect the latest version to be installed? I think maybe we should?
@indirect try again ;) |
It works! Nice job. :) While testing it out, I noticed this:
While testing out issues installing gems, I ran into this:
|
Should be fixed now! (and the |
Cool, thank you! |
Oh right, looking back over my previous post, I still have a question: with exec gems installing to a different location that isn't managed by gem install and gem uninstall...
|
and I guess also |
|
I didn’t think of this until just now, but does |
It does not work, since
|
Ok, I think I’m going to request to special case |
OK, |
Okay, this looks good to me! Going to restart the jobs that aren't passing. |
🤔 Sadly there's gem called gem already pushed to rubygems.org (https://rubygems.org/gems/gem). That's going to conflict with |
I have good news, better news, and bad news. The good news: the The better news is that the gem was handed over to the RubyGems team (by adding Evan Phoenix as an owner). If needed, we can always yank it, but since it has no executable I don't think it matters. The bad news is that the |
@indirect |
Also fix native extensions that load dependencies
For ruby-core compat
Will save on an error if it would be nil from an exception happening during that line
8994848
to
d6797a0
Compare
Gem.path_separator can also be a regexp...
All builds are finally green!! |
🎉 |
gem exec
command to run executables from gems that may or may not be installed
Add gem exec command (cherry picked from commit 451ac56)
Should yank/delete the gem called "gem". That seems like a (minor) security risk to me. |
I could see yanking the |
The gem called |
I submitted rubygems/rubygems.org#3569 to address this concern. |
very helpful! 🎉 |
What was the end-user or developer problem that led to this PR?
Lack of an easy way to run executables from gems that may or may not be installed.
What is your fix for the problem, implemented in this PR?
See rubygems/rfcs#45
Make sure the following tasks are checked