Upgrading from 0.28.0 to latest version

Linux mint 18.2 64 bits
Crystal 0.28.0 [639e4765f] (2019-04-17)
LLVM: 4.0.0
Default target: x86_64-unknown-linux-gnu

Hestitant to upgrade to the latest version of Crystal.
What is the easiest method to “downgrade” or revert the upgrade and go back to 0.28.0 ?

Add the repo as per the instructions.
apt upgrade
If you don’t like the current version, remove the repo from your apt list.
apt upgrade (you should probably apt purge crystal, but you can likely get away with the lazy way)

If you want to get a bit more detailed, you can request specific versions via apt as well. https://www.linuxuprising.com/2019/02/how-to-downgrade-packages-to-specific.html

But the above way is the quick and dirty apt repo way and how I usually roll.

I will use the second link, as I don’t want to remove the repo from my list.
Thanks

Downloading from https://github.com/crystal-lang/crystal/releases and uncompressing the .tar.gz is the easiest way for me. But my use-case is sporadic usage of old versions. As long as you prepend the bin directory into the path you should be good to go.

Using docker is also pretty easy. Each version is tagged.

Gonna add my two cents, just use a version manager. I use asdf which has support for Crystal and several other languages. If you need a specific version of Crystal it’s super easy to just do asdf local crystal 0.29.0

2 Likes

Just installed asdf (similary to rbenv I think), super easy indeed.
Installed both version and switched between them to run my tests.
Thanks for your 2 cents.

2 Likes

I didn’t know we had that. Thanks Watzon!

1 Like