-
-
Notifications
You must be signed in to change notification settings - Fork 2k
bundle install defaults to installing all groups #1771
Comments
I believe the #1688 issue is related to this. I'm guessing this is on the minds of the maintainers of Bundler, at the very least. :) |
I'm glad to hear it! Is there any timeframe we could see this implemented? Would it be months or years? I mean, will it be a major (2.0) or a minor (1.2) change in the version? |
Judging by the title of that issue, being 'investigate', I don't think there is any definite time frame. Although I'm sure other ideas to solve this problem would be welcome. :) |
I don't think that changing the default behaviour (interface change) would require deep investigation. I just want that I.e. If I have the following in my Gemfile: gem ...
group :production do
gem ...
end
group :development do
gem ...
end
group :test do
gem ...
end
group :etc do
gem ...
end And I run Then bundler installs only gems listed in the production group So that users won't be forced to run And If I run |
Yup, I understood that. The issue I pointed out is for using information in the Might I suggest not making your end users using If Bundler were to install some default group and exclude others, how should this group name be communicated to Bundler? I think that is an important decision to be made, right? My initial thought is a project-wide config file, maybe a What do you think? /cc @indirect |
The -1 for it defaulting to NOT installing development + test groups. This is primarily what I use it for. |
So the bundler is intended to be used only by developers?
Well, we can default to NOT installing all groups and require user to have something like this in her Gemfile:
Can I override this behavior using some The approaches you suggested look like workarounds to me.
So bundler is not used by your users? Or you wouldn't mind if some application forced you to install a gem you don't need? |
I see that the default group already exists:
I just has to be available to bundle install. |
@Vanuan, you seem to have a very different idea of "users" than we do. Bundler is a tool for developers, to help them develop and deploy applications written in ruby. Anyone who is checking out a git repository is (sort of, at least) a developer, so Bundler is optimized to support the developer workflow. There is no simple Any ruby-based application that is deployed to a server will (hopefully, hah) use some sort of deployment script. For example, Bundler ships with bundler/capistrano and bundler/vlad, and others have written their own scripts. Those scripts all include the option If an application is being distributed for use instead of development, I strongly suggest that you use the Furthermore, if you are planning on shipping your application to true end-users, I strongly suggest that you do not ask them to run In conclusion, we would prefer not to add a Thanks for the feedback. As always, we appreciate it. |
It would be great if I could do so. The problem comes when a user wants to install a plugin (Rails 3 Engine) to an application. Rails 3 Engine is a gem that can require an arbitary set of gems with different versions. So bundler helps in this situation. Now I see that it is not a purpose of bundler to solve a problem of installing gems. It is sad. |
Wat. Bundler's purpose is to solve a problem of installing gems. Could you go into more detail about how it doesn't solve this particular problem? |
I.e. it is a developer tool, not a tool that helps deliver gems to the user. |
Correct. It is not difficult to build a rake task as Rohit suggests and get users to install gems that way. Ryan Bigg On Monday, 19 March 2012 at 2:39, John Yani wrote:
|
Currently bundle install defaults to installing all groups. This is not very nice to require a user to install development dependencies. I think that test and development groups should be opt-in, not opt-out. Because developers are always a minority.
Here's a discussion on that:
backlogs/redmine_backlogs@200e111#commitcomment-1097937
Maybe there's a way to opt-in not opt-out groups?
The text was updated successfully, but these errors were encountered: