TaKO8Ki / frum

A little bit fast and modern Ruby version manager written in Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to add an extra Ruby version

cryptoboogie opened this issue · comments

I installed Ruby 3.1.0 and then Rails 7.0.0 - apparently there's a problem with this config and users are instructed to use Ruby 3.0.3 with Rails 7.0.0.

I would like to install Ruby 3.0.3 and switch over the local install to that. Is this possible? I am new to Ruby so pardon my ignorance. I am thinking of frum as a tool similar to n (node+npm env tool), which allows you to have multiple configs and switch between them. Am I wrong in thinking of it this way?

Pointers appreciated.

For posterity, I've tried the following:

frum install ruby 3.0.3

Result:

thread 'main' panicked at 'internal error: entered unreachable code', src/version.rs:33:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

AND :
sudo frum uninstall 3.1.0
Result:

==> Uninstalling Ruby 3.1.0
error: We can't find the necessary environment variables to replace the Ruby version.

My environment:
macOS Monterey (v 12.0.1)
M1 Pro

@cryptoboogie you are not wrong, that is what frum and other Ruby version managers like rbenv and `rvm do. They allow you to install as many different ruby versions as you like and easily switch between those versions. Any custom configuration or gems you install for one version will only be available for that specific version.

Had the same issue.

  • Installed frum (version 0.1.2) and
  • Issued $ frum install 3.2.3. Completed without error and without additional output.
  • Tried to change locally used version of ruby to 3.2.3 by issuing frum local 3.2.3 as described by help page. Result:
$ frum local 3.2.3
error: We can't find the necessary environment variables to replace the Ruby version.

This turned out to be an issue with the shell, opening a new shell fixed it. (Maybe check you have the necessary entries in your .zshrc or .bashrc.)