I have installed Grails on Linux and set my Grails_HOME and JAVA_Home paths likes:
[Hbrock@Harrison-Oracle ~]$ export JAVA_HOME=/usr/lib/jvm/java-1.6.0
[Hbrock@Harrison-Oracle ~]$ export PATH="$PATH:$JAVA_HOME/bin"
[Hbrock@Harrison-Oracle ~]$ export GRAILS_HOME=/home/Hbrock/Grails/grails-2.2.0.RC1
[Hbrock@Harrison-Oracle ~]$ export PATH="$PATH:$GRAILS_HOME/bin"
[Hbrock@Harrison-Oracle ~]$ javac -version
javac 1.6.0_24
[Hbrock@Harrison-Oracle ~]$ grails -version
Grails version: 2.2.0.RC1
But it does not seem to be saving this. I this is error the next time I open the terminal widow and try to run grails:
[Hbrock@Harrison-Oracle ~]$ grails -version
bash: grails: command not found
[Hbrock@Harrison-Oracle ~]$
You’ve only set those paths for the current terminal session. You would need to add those commands to your shell’s startup file. Since you’re running some flavor of linux, it might be
Do an
ls -aand look for that file (or something similar) and then add all the commands you entered at the command line. Then, every time you start your shell/terminal, they will be set.