Last updated by 4 years ago
Page: Installation, Version:28
Installation from Downloadchanged
PrerequisitesIn order to start using Grails you need to have the following:
- An installation of Java SDK 1.4 or higher and have set your JAVA_HOME variable to the SDK install location.
- Download the latest Grails release
- Extract the archive into an appropriate location; typically C:\grails on Windows or ~/grails on Unix
- Create a GRAILS_HOME environment variable that points to the path where you extracted the archive (eg C:\grails on Windows or ~/grails on Unix)
- If you have not set the JAVA_HOME environment variable yet, create JAVA_HOME environment variable that points to the path where you have installed Java
- Append a reference to the "bin" directory within the Grails directory to your PATH variable (eg %GRAILS_HOME%\bin on Windows or $GRAILS_HOME/bin on Unix). Note that, for Windows, both PATH and GRAILS_HOME must be defined at the same environment variable level (eg. 'System variables') rather than across environment variable levels (eg. PATH under 'System variables' and GRAILS_HOME under 'User variables')
- Type "grails" at the command line, if a help message is displayed you are ready to start using Grails!
- If you get an error message, try to
grailsscript inside the
Installation from Git
PrerequisitesIn order to start using Grails from Git you need to have the following:
- An installation of Java 1.5 or higher and have set your JAVA_HOME variable to the install location
- A working installation of Apache Ant 1.7 or higher
- JUnit (to run the build tests - put junit.jar in your ANT_HOMElib directory)
- A Git client
- Checkout Grails from the Git repository
- Run this command: git clone git://github.com/grails/grails.git (+)
- Set the GRAILS_HOME environment variable to CHECKOUT_LOCATION/grails/grails
- Add the "%GRAILS_HOME%\bin" directory to your PATH environment variable
- Add the "%GRAILS_HOME%\ant\bin directory to your PATH environment variable.
- (You may need to give the scripts in "%GRAILS_HOME%\ant\bin execute permissions.)
- Increase the java memory to 1024M by setting ANT_OPTS=-Xmx1024M
- Go to the %GRAILS_HOME% directory and type "ant jar" to build Grails
- That's it! Start developing in Grails!