-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Bundler doesn't use the right gems location #2667
Comments
I'll note that it is the location that gem install installs to by default, but your distribution forcing everyone to use Rubygems' |
Only on certain systems.
Nobody is being forced. Users can do
Yes it does.. The documentation says 'This defaults to the gem home, which is the location that gem install installs gems to', and that's demonstrably false. The location that gem install installs gems to depends not only of /etc/gemrc, but ~/.gemrc as well.
I want 'bundle install' to install to the same location 'gem install' installs to. The bottom line is that Even if there was no /etc/gemrc, the user might have ~/.gemrc configured, or might even want the equivalent of |
Thank you for your feedback. Bundler will not be changing the way it installs gems to honor .gemrc files. If you would like Bundler to always install to the If you'd like to add a --user-install option to Bundler that sets the installed path to Gem.user_dir, I would be happy to merge it. On Oct 7, 2013, at 11:57 AM, Felipe Contreras notifications@github.com wrote:
|
If that's the case, the documentation is still wrong.
I would like Bundler to use the same location
I would do it if I had any trust in the project. The first time I use Bundler it doesn't work. I report a problem that clearly would affect all Arch Linux users and it gets immediately closed. Why would I even use Bundler? I can just grep the Gemfile and use |
I've updated the documentation in c83b7ce.
That's a) not how bundler works, and b) not possible.
Bundler's configuration is per-user.
The point of Bundler is not to make it easy to install gems. If that's what you want, please don't use Bundler. |
Still wrong: "which is also the default location where It's not.
Everything is possible. If I write the patch would you apply it?
Which is why it doesn't work.
I won't. And I'll make sure Rubinius updates it's install instructions to avoid bundler, which clearly doesn't do what they expect. |
Yes, it actually is.
Only a subset of gems listed in the gemfile can be installed in a way Rubygems understands. The Rubygems team has definitively stated that they do not and never will support the git and path gems that Bundler also supports, so it isn't possible, even if Bundler were to respect the gemrc file.
Good luck with that. |
It is here, on all Arch Linux machines.
That's a red herring. I said I want So it is possible, you just don't want to. |
I came here and read the discussion. I agree with @felipec, it's confusing that |
I agree as well. It doesn't need to be the default way bundler handles gem install, but there should be a flag that either looks for the "user-install" setting in ~/.gemrc and /etc/gemrc or some other way to follow where "gem install" actually installs things to. I think there are two use cases conflicting here. The primary case that bundler solves extremely well is dependency management for projects that are getting deployed to various environments/servers. The other case where this setup hurts is where you want to have dependency management for helper scripts. These scripts aren't deployed to environments or any sort of project in the classic software development world. These are for diagnosing user problems, mining data for information, etc. and will always be manually used by a person. In this case, why on earth would I want to pollute by system ruby with random gems from this? I guess I should look at getting rvm installed specifically for this, but that seems like overkill when all I need to do to maintain my workstation is separate user gems from system gems. |
The documentation of
bundle install
says this:"This defaults to the gem home, which is the location that gem install installs gems to."
However, that's not true. My distribution has the following in '/etc/gemrc': gem: --user-install. Which means
gem install foo
works, but bundler doesn't work.At the very least
bundle install
should have a similar --user-install option, and perhaps even read gemrc, that would be the only way to make sure it does the same asgem install
.The text was updated successfully, but these errors were encountered: