TaKO8Ki / frum

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

How to add an extra Ruby version #114

Closed cryptoboogie closed 2 years ago

cryptoboogie commented 2 years ago

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

blakeperdue commented 1 year ago

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

DcsMarionDickten commented 6 months ago

Had the same issue.

$ 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.)