Closed emilebosch closed 1 year ago
I also offered it to build it in gem https://github.com/rubygems/rfcs/issues/20
Have a look at https://rubygems.org/gems/gemx as well
Thanks!
Just added this
https://github.com/emilebosch/gem-exec
Sent from my iPhone
On 12 Aug 2019, at 17:15, Samuel Giddins notifications@github.com wrote:
Have a look at https://rubygems.org/gems/gemx as well
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
I'm going to propose that we name this bundle run
, and that the command in question be run inside the context of the bundle regardless of whether the gem is in the Gemfile or not. That might mean resolving and installing the gem before running, if needed. I think this is a big need in the tooling world, where eg your editor needs to be able to run rufo
, but you don't have it in your Gemfile.
tl;dr: bundle run rufo
would effectively do a temporary bundle add rufo && bundle exec rufo
without editing the on-disk Gemfile or lockfile.
Even though I'm was a fan of it originally, I do think having a lock file or adding it is a great thing because it makes things deterministic. it would really only be to bootstrap things like rails or Sinatra or smth that you can later check in.
Good point! We should probably count this issue as resolved by https://github.com/rubygems/rfcs/pull/45, and open a new tracking issue for bundle run
or whatever we end up calling it.
In the JS ecosystem there is a tool called
npx
which downloads a npm package and directly executes it.Read about it here https://github.com/npm/npx
I would love to have this too in the ruby ecosystem, not sure if it needs to be part of
gem
or bundler. But let me know!or
Let me know what you all think.