I’ve recently installed Ubuntu Linux on my laptop, and in order to get Grails running, had to do the following:
- Edit /etc/environment and set up environment vars for Groovy, Grails and Java:
<code> GRAILS_HOME=/INSTALL_DIR/grails-0.2 GROOVY_HOME=/INSTALL_DIR/groovy-1.0-jsr-05 JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.06 export GRAILS_HOME GROOVY_HOME JAVA_HOME PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11: /usr/games:$GRAILS_HOME/bin:$GROOVY_HOME/bin" </code>
This file was new to me on Ubuntu, I’m used to defining env vars in a .profile file. In order to get the new vars setup, source the file – ‘source environment’.
- After the previous step, the included script files with Grails needed to be changed to executable in order to run. cd into the grails directory, and then ‘chmod +x’ for both INSTALL_DIR/bin/grails and INSTALL_DIR/ant/bin/ant