asdf-vm / asdf-vm/asdf-ruby

Share gems between Ruby minor versions

Open
#119 2 comments 9 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
Shell
Stars
734
Forks
156
Avg merge
17h 6m
Merged PRs (30d)
1

Description

There's a nice plugin [rbenv-communal-gems](https://github.com/tpope/rbenv-communal-gems) for rbenv to share the gem directories for minor versions, so e.g. all 2.6.x Rubies use the same gempath,2.5.x Rubies use another one, etc.

This is the standard approach used by Ruby itself, so this shouldn't cause any breakage and can save lots of space and headaches :)

It works by symlinking the `gems` folder inside the different Rubies:

```sh
$ ls -l ~/.rbenv/gems/
total 12
drwxr-xr-x 9 toupeira toupeira 4096 Mai 27 17:41 2.4.0
drwxr-xr-x 9 toupeira toupeira 4096 Mai 28 09:11 2.5.0
drwxr-xr-x 9 toupeira toupeira 4096 Mai 28 15:09 2.6.0
$ ls -l ~/.rbenv/versions/2.6.3/lib/ruby/gems
lrwxrwxrwx 1 toupeira toupeira 16 Mai 18 05:51 /home/toupeira/.rbenv/versions/2.6.3/lib/ruby/gems -> ../../../../gems
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.