Skip to content

Steve Hill

GVM & Local Versions

1 min read

+GVM is a nifty tool for managing versions of +Groovy, +Grails and more. It's in the spirit of RVM for Ruby and is created and maintained by the super-responsive @marcoVermeulen.

I've been trying out the Grails 2.3.0.M* milestones recently and thought I spotted a bug, but before filing a report, I wanted to know if it was newly introduced in M2 or existing from M1. Once I installed 2.3.0.M2, I couldn't simply switch back to M1.

1$ gvm use grails 2.3.0.M1 # Stop! 2.3.0.M1 is not a valid grails version.

Puzzled, I took a look at the list of grails versions.

1$ gvm list grails
2=================== Available Grails Versions ===================
3 + 2.3.0.M1
4 > * 2.3.0.M2
5 * 2.2.3
6 2.2.2
7 # extra versions omitted for space
8 1.2.0
9==================================================================
10 + - local version
11 * - installed
12 > - currently in use
13==================================================================

After some fiddling, I came to the answer.

1$ gvm offline enable # Forced offline mode enabled.
2$ gvm use grails 2.3.0.M1 # Using grails version 2.3.0.M1 in this shell.

If you haven't tried GVM, it's definitely worth a look. Tools like this make the entire ecosystem better, and that's something we all benefit from. Thanks to everyone involved!