Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Install Multiple Crystal Lang Versions on OSX (Homebrew)

Install Multiple Crystal Lang Versions on OSX (Homebrew)

brew unlink crystal-lang
brew install <url to formula> # check more on appendix below

If you'd like to check for installed crystal versions, just run:

brew switch crystal-lang 0
# Error: crystal-lang does not have a version "0" in the Cellar.
# Versions available: 0.15.0, 0.16.0, 0.17.0, 0.17.1, 0.17.2, 0.17.3, 0.17.4

ps: 0 is just a dummy non-existing version so homebrew breaks and show you available versions.

Then you can easily switch to a specific version using:

brew switch crystal-lang 0.17.4

Being honestly, this approach is only useful if you need to build a project or run spec suite, if you have need to run a small snippet, use and make world a better place! :)

Appendix Crystal Homebrew History

Copy link

carcinocron commented Nov 3, 2021

brew switch crystal-lang 0
Error: Unknown command: switch

Copy link

fernandes commented Nov 3, 2021

hey @InstanceOfMichael , homebrew got rid of the switch command

I've been using to manage crystal versions and it works like a charm, I do recommend


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment