Switching Ruby versions using homebrew

jaysoifer Source

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?



answered 5 months ago suyogb #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]

comments powered by Disqus