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

NPX like behaviour like with bundle exec -i #20

Closed
emilebosch opened this issue Aug 12, 2019 · 6 comments
Closed

NPX like behaviour like with bundle exec -i #20

emilebosch opened this issue Aug 12, 2019 · 6 comments
Assignees

Comments

@emilebosch
Copy link

emilebosch commented Aug 12, 2019

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!

bundle exec -i rails/rails new blog

or

gem exec rails/rails new blog

Let me know what you all think.

@emilebosch
Copy link
Author

I also offered it to build it in gem #20

@emilebosch emilebosch changed the title NPX like behaviour like with bundle exec -i rails/rails new blog NPX like behaviour like with bundle exec -i Aug 12, 2019
@segiddins
Copy link
Member

Have a look at https://rubygems.org/gems/gemx as well

@emilebosch
Copy link
Author

emilebosch commented Aug 12, 2019 via email

@indirect
Copy link
Member

indirect commented Feb 6, 2023

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.

@emilebosch
Copy link
Author

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.

@indirect
Copy link
Member

indirect commented Feb 6, 2023

Good point! We should probably count this issue as resolved by #45, and open a new tracking issue for bundle run or whatever we end up calling it.

@indirect indirect closed this as completed Feb 6, 2023
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

3 participants