Skip to content

Loading…

Proof of concept for automatic, bundler-managed gemsets #53

Closed
daytonn opened this Issue · 3 comments

2 participants

@daytonn

Using the same basic function as chruby_auto I created gemsets based on the Gemfile's parent directory name and replace the entire GEM environment variables with that single gem location.

Logically assuming all Gemfiles have a corresponding gemset means shim-less, bundler-managed gems.

https://github.com/daytonn/chruby/blob/automatic-gemsets/scripts/gemsets.sh

This needs tests and could be refactored into a shared function that chruby_auto could also use.

This is a proof of concept.

Thoughts?

@postmodern
Owner

You might want to look at chgems. It sets GEM_HOME to $PWD/.gem/$ruby/$version to make cleanup easy and spawns a sub-shell instead of auto-switching. Also, I don't think it's wise to use gemsets for every bundler project.

@daytonn

Scratched my own itch. For others with this itch: https://github.com/daytonn/auto-gemsets

@postmodern
Owner

Closing now that auto-gemsets is available to users.

@postmodern postmodern closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.