-
Notifications
You must be signed in to change notification settings - Fork 48
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
Ability to have a global gemset #16
Comments
Just specify a global gemset in your home directory .rbenv-gemsets file - like so:
I had to run |
I'm a little reluctant to add the concept of a "global" gemset, because I fear it'll require special cases and general ugliness. I like @matthewlehner's suggestion, because it should "just work". That said, I'm not opposed to the feature itself. If you can make a built-in "global gemset" work without too much ugliness, I'd consider it. |
I was able to make @matthewiehner's suggestion work, so I'll try that for a while and see how it works. Thanks! |
What if "global" was simply repurposed to point to gems installed outside of any given gemset, which is an already extant, standard location? This would mimic the use of the "system" keyword in rbenv itself, and could resolve to the active ruby's native gemdir, as reported by For instance, a gemsets file containing It keeps everything opt-in, uses standard paths, and as far as I can tell, would only require a small change to the line that sets Would that be sufficiently clean? |
That's kind of the special-case thing I was talking about, which makes me uncomfortable. However, if you want to take a stab at it and submit a pull request, we could use that as a basis for discussion. I'm definitely not opposed to the idea of a global gemset; I'm just concerned that the increased cost of maintenance might outweigh the benefit. |
I've been having great luck with @matthewlehner's suggestion. I have a .rbenv-gemsets file in ~ that just has "global" in it. Then all my project gemset files have "project-name global". I wrote a shell script to ensure I never forget the global gemset: write-gemset () {
echo "$1 global" > .rbenv-gemsets
} |
Every time I create a new gemset the first thing I have to do is
gem install bundler
. I also have to cd to my home directory any time I want to run something already installed but not in a gemset. I started adding a global gemset (similar to the RVM implementation) but thought it might be better to just keep the non-gemset path in GEM_PATH. I can see advantages and disadvantages to both approaches. Do you have a preference on this, Jamis? I'm happy to implement and send a pull request.The text was updated successfully, but these errors were encountered: