Grails commands don't work

Posted September 11, 2014 4.8k views

I installed grails on a new Ubuntu droplet using gvm. Doing gvm list grails shows that grails 2.3.8 is installed, as expected. Doing any grails commands causes the screen to refresh and does nothing else. Anyone else experience this?


These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Grails seems to be installed correctly. The only thing that I can think of is that Java is not installed. In fact, I just tested it. If I remove my Java installation, grails shows the same behavior that you’re describing.

To install Java, run:

sudo apt-get install default-jdk
  • Could be something wrong with java installation. I do have java installed: which java produces /usr/bin/java. I set JAVA_HOME to /usr/bin/java and CLASSPATH to /usr/lib/jvm/java-1.7.0-openjdk-amd64 (I had installed a different java). Does that look correct?

  • JAVA_HOME is the install directory, not the location of the binary. On my system, it is:

    # echo $JAVA_HOME
  • Thanks! Setting JAVA_HOME to that lets my grails -version command work