1

One of the projects that I've been working has a dependency on [email protected].

I'm using a Mac and the version of Ruby that I used for other projects is the 2.5.

I want to temporarily switch from 2.5 to 2.3 using brew. I don't want to use neither rbenv nor rvm.

1. I've installed the 2.3.7 version, using brew:

bf-old> brew install [email protected] Warning: [email protected] 2.3.7 is already installed and up-to-date To reinstall 2.3.7, run `brew reinstall [email protected]

2. I'm trying to switch to it, but it's not working:

bf-old> brew switch 2.3.7 Error: 2.3.7 not found in the Cellar.

What can I do about this?

3
  • 1
    Why don't you want to use established mechanisms (although I currently prefer asdf) for switching? It's much easier and more reliable. In any case, have you brew doctored first? And are you running the brew you think you are (e.g., github.com/Homebrew/legacy-homebrew/issues/25647) May 22, 2018 at 15:26
  • Yeah, I'd use rbenv or rvm and curious why you are ruling those out.
    – Joe
    May 22, 2018 at 17:36
  • I like to run terminal sessions inside of Emacs using multiterm. It's not so easy and straightforward to mirror environment variables needed by something like rvm inside of it, so I just avoid it: stackoverflow.com/questions/5521112/… . This is one of the reasons. The other one is that I was curious as to how to make this work / why it wasn't working. May 23, 2018 at 6:56

1 Answer 1

1

Check if both the ruby versions are installed. If both are installed, then try this:

brew unlink [email protected] && brew link --force --overwrite [email protected]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.