'Changing PATH in zsrhc depending on the selected ruby version
Is it possible that the PATH entries in the zshrc automatically adapt to the selected ruby version? At the moment the zshrc contains e.g.
export PATH="/Users/mariopeischl/.gem/ruby/3.1.0/bin:$PATH"
export PATH="/Users/mariopeischl/.gem/ruby/3.1.0/gems:$PATH"
If I now change the used ruby version with
$ chruby 3.0.3
I have to change the PATH entries manually each time. Is there a way to automate this with a variable?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
