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

Fix detection of global Ruby version #111

Open
bkuhlmann opened this issue Nov 24, 2021 · 2 comments
Open

Fix detection of global Ruby version #111

bkuhlmann opened this issue Nov 24, 2021 · 2 comments

Comments

@bkuhlmann
Copy link

bkuhlmann commented Nov 24, 2021

Overview

After installing and upgrading to a newer version of Ruby, I'm not seeing Frum detect and automatically switch to the global version.

Steps to Recreate

  1. Install the latest version of Ruby: frum install 3.0.3.
  2. Update your global version version file: printf "%s\n" "3.0.3" > ~/.ruby-version
  3. Ask Frum to list current versions: frum versions.
  4. Notice that Frum doesn't detect what's in ~/.ruby-version and automatically update the global version to the new version. Instead, it is pointing to the previous version. See screenshot:

2021-11-24_07-50-37-iTerm2

Desired Behavior

When the global Ruby version is updated ~/.ruby-version, I would expect Frum to detect this change and update it's global alias accordingly.

The workaround for fixing this is to run frum global 3.0.3. This will manually update Frum to use the right global version but since other versions managers do this automatically for you, it'd be nice if Frum could automatically do this without having to remember to run this extra step manually.

Environment

  • macOS: macOS 11.6.1
  • Frum: 0.1.1
  • Ruby: 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [arm64-darwin20.6.0]
@dinshaw
Copy link

dinshaw commented Dec 11, 2021

Not sure if this is related or not but when I use zoxide's z instead of cd to enter into a directory with a valid .ruby-version file, frum does not auto switch. If I then cd . frum does change the ruby version.

@bkuhlmann
Copy link
Author

bkuhlmann commented Dec 12, 2021

If it helps, I can recreate this behavior on my machine too. Originally, when I wrote the above issue, I thought maybe I had misconfigured Frum but, turns out, I'm usually always using the same version of Ruby when using Zoxide to jump between Ruby projects so didn't realize the difference was between Zoxide and cd when using Frum. So cd works fine but when using z, Frum doesn't detect the direct change for some reason and update the Ruby version accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants