I started a toy project just to give Grails a try and want to share the project setup, and other steps. I were really impressed by the demo applications: painless, easy startup and CRUD applications, but yes a bit too late but I were really busy at my new job, and also trying to get used to my new country, and of course I admit that I am a bit lazy too ![]()
After reading the Getting Started with Grails free booklet, and well prepared Grails Documentation I started playing with it
Well startup steps with IntelliJ IDEA:
- Download the Grails
- Set the GRAILS_HOME and add it to path environment variable
- Download the Grails IntelliJ plugin JetGroovy (If you use IntelliJ IDEA 8 you should skip this step, since JetGroovy plugin is bundled in this version otherwise IDE would crash)
- Just unzip the JetGroovy to plugins folder
- Change the installation directory for Grails from Settings/Groovy&Grails
- Update the JetGroovy plugin from Settings/Plugins (There were some mysterious errors at IntelliJ like crashing at Backspace key
)
My first HelloGrails application had the below error, after playing with the Grails version and trying an older version: grails-1.0.4, I realized that the Groovy was also necessary for JetGroovy plugin. I had already installed groovy but GROOVY_HOME environment setting was missing, but still I could not get the point: Why can’t I use Grails without Groovy @IntelliJ?
java.lang.ClassNotFoundException: org.codehaus.groovy.grails.cli.GrailsScriptRunner
at org.codehaus.groovy.tools.RootLoader.findClass(RootLoader.java:156)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:128)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:98)
at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:130)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
Process finished with exit code 1
Anyway, you can add two more steps for Grails startup for IntelliJ IDEA users:
- Download the Groovy
- Set the GROOVY_HOME and add it to path environment variable
My startup configuration:
grails-1.0.4
groovy-1.5.7
jdk1.6.0_07
IntelliJ IDEA 7.0.4

![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=51b81433-4df9-4297-b277-a9879f68f03e)
