TaKO8Ki / frum

A little bit fast and modern Ruby version manager written in Rust
MIT License
628 stars 15 forks source link

frum cannot set local / global version #117

Open s-p-b opened 2 years ago

s-p-b commented 2 years ago

I'm not having any success with setting either a local or global version of frum. After going through the installation process detailed here, setting by .bashrc to initialize frum, and installing ruby 3.1.1, I try to set the global version, but still get the system ruby:

$ frum global 3.1.1
$ frum versions
  3.1.1
$ ruby -v
  ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin17]

When trying to set the local version, I get this:

$ frum local 3.1.1
  error: We can't find the necessary environment variables to replace the Ruby version.

My machine is a mid-2009 Macbook Pro, running High Sierra 10.13.6 What am I doing wrong here? Thanks!

nfgrep commented 2 years ago

I had this happen aswell. If I manually called eval "$(frum init)" immediately after calling frum local <version>, it would work. I also noticed that this behaviour only happened when I didn't manually set the global ruby version with frum global. After setting the global ruby version with frum global and then restarting my shell, everything seemed to work. I suspect there's some logic that implicitly depends on there being a global ruby version.