GVM & Local Versions

June 28, 2013

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.

$ 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.

$ gvm list grails
===================  Available Grails Versions =================== 
      + 2.3.0.M1   
    > * 2.3.0.M2
      * 2.2.3
        2.2.2
        # extra versions omitted for space
        1.2.0  
==================================================================
      + - local version
      * - installed
      > - currently in use
==================================================================

After some fiddling, I came to the answer.

$ gvm offline enable  # Forced offline mode enabled.
$ 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!


Profile picture

Written by @sghill, who works on build, automated change, and continuous integration systems.