Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Bundler CLI to support installing (and saving them to Gemfile) gems just like npm #4932

Closed
andhapp opened this issue Aug 29, 2016 · 2 comments

Comments

@andhapp
Copy link

andhapp commented Aug 29, 2016

Hello,

I would like to propose an enhancement to Bundler to support installing and saving a gem to Gemfile all using the CLI and the command will look like:

bundler install rake --save

This could then be further extended to allow saving it to the right group:

bundler install rake --save development, test
bundler install rake --save production

I will be happy to create a PR for the same.

Is it worth pursuing?

@segiddins
Copy link
Member

There's an add command that exists currently in the codebase but isn't exposed via CLI yet, in addition to the existing inject command

@indirect
Copy link
Member

Thanks for the suggestion! We think this is a good idea. Today, you can add gems to your Gemfile using the bundle inject command, but you have to include the exact version that you want to add. In the next version of Bundler, there will be a bundle add command that lets you add a single gem without having to also give a version number.

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

No branches or pull requests

3 participants