Skip to content
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

Uses global gemset after local gemset #20

Merged
merged 1 commit into from
Jun 6, 2012
Merged

Uses global gemset after local gemset #20

merged 1 commit into from
Jun 6, 2012

Conversation

joefiorini
Copy link
Collaborator

This will force rbenv to always look for gems in the global gemset, but it will use a local one if specified. It works great on my machine. Note, however, there is no easy way to install gems to that gemset at the moment. If you want to try it out you can run rbenv gemset create global. Note to install gems you'll have either change your .rbenv-gemsets to only point to global then change it back or create a directory with a .rbenv-gemsets that has only "global". Then you can switch to that directory to install gems then switch back. I do have a plan for installing, but I don't have time to finish it now. Essentially I'm thinking of implementing an rbenv gemset install [--gemset name] [--global] NAME command that will install a gem to the gemset specified. Could the --gemset switch be useful for scripting?

What do you all think of this solution? Is there a problem I'm not seeing?

@halorgium
Copy link
Contributor

I realised that my pull request (#22) adding support for an environment variable to specify the active gemsets overlaps with this as well.
If you were able to have both the .rbenv-gemsets file and the environment variable, you could more easily achieve this global gemset feature.

@joefiorini joefiorini merged commit b9328bf into jf:master Jun 6, 2012
@joefiorini
Copy link
Collaborator Author

@halorgium In pulling this in I renamed your variable to RBENV_GEMSETS to remain consistent with the filename.

@jf jf mentioned this pull request Nov 27, 2013
jf added a commit that referenced this pull request Jan 19, 2015
auto-inclusion of the *specially-reserved and named gemset called "global".

*(For the history and timeline of this feature (also known as "the gemset
known as 'global'"), see #16, #18, and #20.)

Closes #59.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants