Installing GVM (Grails Version Manager)
To install GVM we need to install Curl first via terminal sudo apt-get install curl
then we could follow the instructions in the http://gvmtool.net/
curl -s get.gvmtool.net | bash
after the GVM is installed type this in the terminal gvm help
we should see the list of candidates:
candidate : gaiden, gradle, grails, griffon, groovy, groovyserv, lazybones, springboot, vertx
if you are not able to see the candidates list you need to uninstall the GVM and install it again
how to uninstall GVM
we need to delete this #THIS MUST BE AT THE END OF THE FILE FOR GVM TO WORK!!!
[[ -s “~/.gvm/bin/gvm-init.sh” && ! $(which gvm-init.sh) ]] && source “~/.gvm/bin/gvm-init.sh”
lines in the
~/.bash_profile (or ~/.profile)
~/.bashrc
and
~/.zshrc
just use your text editor to open the file and delete it ex. sudo gedit ~/.bash_profile
then delete the ~/.gvm
directory rm -rf ~/.gvm
if your GVM installed properly you can now install Grails by typing
gvm install grails [version]
ex. gvm install grails 2.1.1
to see the list of available grails type gvm list grails
if you see a note saying that your gvm is in offline mode just put it online by typing gvm offline disable
NOTE: you might think that the code I posted above is not working due to constant errors that you will receive, this is normal, I repeat the steps above numerous times before it installed perfectly, especially in installing the grails, you have to put you gvm in online mode repeatedly because it automatically turns offline when installation fails.