Installing Grails

Posted by Anantha Narayanan On 10:01 PM No comments

Grails is an open source web application framework. It is based on Java and Groovy. (Groovy is a language for Java platform.) To learn more about Groovy click here.

Before downloading Grails, you will need Java 5.0 or greater. Download and install Java before installing Grails. Once java is installed set environment variable JAVA_HOME to the path where java is installed.
Now it is time to download Grails, do it from here. http://www.grails.org/Download.

As of this writing the latest stable release is 1.3 (release: 1.3.7). We will use this version in our examples. We will download any database as and when we hit the topic.
Extract the archive downloaded from Grails website to c:\grails (Unix users are smart and do not need this step-by-step guide of installation).

Set a new environment variable GRAILS_HOME to c:\grails

Modify the PATH environment variable and append %GRAILS_HOME%\bin. 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')

You are ready with Grails. Type grails in command prompt and you will get a welcome message. If you are not getting it most probably the error must be with JAVA_HOME or GRAILS_HOME or PATH environment variables. I am using ubuntu linux for executing and I got the following message:

Using Java at: /usr/lib/jvm/java-6-openjdk
Welcome to Grails 1.3.7 - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: /usr/share/grails/1.3.7
No script name specified. Use 'grails help' for more info or 'grails interactive' to enter interactive mode

0 comments:

Post a Comment

Recommended Post Slide Out For Blogger