Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add automatic version detection/switching #84

Closed
bkuhlmann opened this issue Jul 17, 2021 · 4 comments
Closed

Add automatic version detection/switching #84

bkuhlmann opened this issue Jul 17, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@bkuhlmann
Copy link

bkuhlmann commented Jul 17, 2021

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 bkuhlmann changed the title Add automatic version detction/switching Add automatic version detection/switching Jul 17, 2021
@TaKO8Ki TaKO8Ki added the bug Something isn't working label Jul 18, 2021
@TaKO8Ki
Copy link
Owner

TaKO8Ki commented Jul 18, 2021

@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

@bkuhlmann
Copy link
Author

bkuhlmann commented Jul 18, 2021

🙇 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.

@TaKO8Ki
Copy link
Owner

TaKO8Ki commented Jul 18, 2021

@bkuhlmann
I'm glad to hear that :) I'll keep on making frum better. I've added this information to README in #86.

@TaKO8Ki TaKO8Ki closed this as completed Jul 18, 2021
@bkuhlmann
Copy link
Author

ℹ️ 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. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants