postmodern / chruby

Changes the current Ruby
MIT License
2.85k stars 190 forks source link

Ability to change .gem and .rubies directory locations #405

Open HaleTom opened 5 years ago

HaleTom commented 5 years ago

I would like to have the .gem and .rubies directories under ~/.local/share so as to comply with the XDG Base Directories Specification.

Currently, they are both assumed to be under $HOME.

Is there a way of changing where these directories are expected to be?

HaleTom commented 5 years ago

See also Stack Overflow question: $GEM_HOME is ignored by gem install

nannery commented 5 years ago

I definitely support this, but one thing to think about is setting $GEM_HOME and $GEM_PATH to, e.g., $XDG_DATA_DIRS instead of always ~/.gems would break current behavior for users with $XDG_DATA_DIRS set, so this would have to be a little more work than just checking an XDG variable first