Add automatic version detection/switching
bkuhlmann opened this issue · comments
Overview
Would it be possible to support automatic version switching much like chruby's auto-switching?
Screenshots/Screencasts
The following captures the problem of having to manually switch Ruby versions when switching between projects:
frum-version_switching.mp4
Steps to Recreate
Run the following:
frum --frum-dir "$HOME/.cache/frum" install 3.0.0
frum --frum-dir "$HOME/.cache/frum" install 3.0.2
printf "%s\n" "3.0.2" > $HOME/.ruby-version
mkdir zero
printf "%s\n" "3.0.0" > "zero/.ruby-version"
cd zero
cd ..
cd zero
Notice that Frum never detects the correct version (global versus local).
Desired Behavior
As shown in the screencast and steps above, Frum doesn't distinguish between the global, system-wide Ruby version of 3.0.2
versus the local project version of 3.0.0
. You have to manually set the Ruby version you desire each time you switch a directory.
Environment
- Operating System: macOS 11.4 (20F71)
- Frum: 0.1.0
@bkuhlmann Thank you for opening the issue! You can set frum-dir
as an environment variable like the following capture. And I think this way solve the problem. I'm sorry I forgot to mention this feature in README. I'm going to add a description to README.
2021-07-18.14.29.28.mov
🙇 Takayuki. Ah, this is excellent to learn! Yes, adding this information to the README would be most welcome. 😄 By the way, thanks for the work on this project. Looking forward to making more use of Frum in all of my projects.
@bkuhlmann
I'm glad to hear that :) I'll keep on making frum better. I've added this information to README in #86.
ℹ️ I'm enjoying Frum and switched all systems to using it then decided to update my article on Ruby Version Managers to default to Frum instead of chruby. 😄