Skip to content
This repository has been archived by the owner. 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
Closed

Comments

@andhapp
Copy link

@andhapp 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

@segiddins segiddins commented Aug 30, 2016

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

@indirect indirect commented Aug 30, 2016

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.

@indirect indirect closed this Aug 30, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.