:jasonrudolph => :blog

puts Blog.new(”nonsense”)

Just Released: Getting Started with Grails

Posted by Jason Rudolph on January 17th, 2007

InfoQ has just released my new book, Getting Started with Grails, and it's available as a free download for you to digg into and find out what Grails is all about.  The book walks you through building a Grails app from scratch, and introduces various Grails features over the course of several iterative development cycles.  So, download the book, grab the sample code, and enjoy!

It was a sincere pleasure to work with the many talented reviewers that helped out on this book.  I hope you find this book helpful, and please feel free drop me a line with any feedback or post a comment below.  Groove on!


Print This Post Print This Post

4 Responses to “Just Released: Getting Started with Grails”

  1. Ted Gordon Says:

    The link to download the book doesn’t work. Does this mean the download version is no longer free? Thanks.

  2. Ted Gordon Says:

    I’m sorry - I figured out that I had to register. Thanks much for making the book available.

  3. gilbert prine Says:

    Jason,

    I just purchased Getting Started with Grails and read it before doing anything. It looks very good! I downloaded and unzipped the Grails 0.4.2 release to, and set the GRAILSHOME to, t:grails0.4.2. I set JAVAHOME to t:jdk1.5.0_06. I then built the following gr.bat file in c:dos where I put Dos 5.0 and batch files I want on the path. (For kicks, I just did a dir on c:dos and my earliest batch file, dated 4/3/1987, ran a basic program!)

    ————————– gr.bat t: cdgrails0.4.2

    path=C:WINNTsystem32;C:WINNT; c:dos;c:;c:adabin;t:jdk1.5.0_06bin;t:grails0.4.2bin;t:groovy1.0bin

    grails ————————– end gr.bat

    I hoped that 0.4.2 would work. I did not find 0.3.1 on the Grails website, only 0.4.2 and the 0.5 releases. The output I got when I typed gr in from c: was:

    ————————– gr.bat response C:>t: T:>cdgrails0.4.2 T:grails0.4.2>path=C:WINNTsystem32;C:WINNT;c:dos;c:;c:adabin;t:jdk1.5.0_06bin;t:grails0.4.2bin;t:groovy1.0bin T:grails0.4.2>grails exception while configuring main class loader: java.io.FileNotFoundException: confgroovy-starter.conf (The system cannot find the path specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(FileInputStream.java:106) at java.io.FileInputStream.(FileInputStream.java:66) at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java :111) at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:160) T:grails0.4.2> ————————– end gr.bat response

    Since it was looking for confgroovy-starter.conf, I copied conf to the base of t: and tried typing gr from c: again and got farther:

    ————————– gr.bat response C:>t: T:grails0.4.2>cdgrails0.4.2 T:grails0.4.2>path=C:WINNTsystem32;C:WINNT;c:dos;c:;c:adabin;t:jdk1.5.0_06bin;t:grails0.4.2bin;t:groovy1.0bin T:grails0.4.2>grails java.lang.ClassNotFoundException: org.codehaus.groovy.grails.cli.GrailsScriptRunner at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:145) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java :121) at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:160) T:grails0.4.2 ————————– end gr.bat response

    I figured maybe I could find the problem so I downloaded Groovy. I got it to work and looked around, but I finally gave up. It may be 0.4.2 or an error on my part. Did I read the directions wrong or do something dumb that you can see but I can’t? More important, can I get 0.3.1 from the grails.org and just didn’t see how to do it?

    Right before the download line, the website had a comment “You will almost certainly see errors after upgrading to 0.4 unless you run “grails clean” and then “grails upgrade” on your project after installing 0.4.2. The grails upgrade target is largely non-destructive but read the on-screen instructions carefully.”

    I may do that, but it may be something you would want to do and post on your website. If you have any suggestions, I would appreciate them.

    Gil Prine prine@comcast.net 301 869-7294

  4. Jason Rudolph Says:

    @Gil,

    Thanks for checking out the book.

    I did not find 0.3.1 on the Grails website, only 0.4.2 and the 0.5 releases.

    You can find the links to the 0.3.1 release (along with other handy information) in the Resources section of the book. I'll include the links here as well.

    http://dist.codehaus.org/grails/grails-bin-0.3.1.tar.gz

    http://dist.codehaus.org/grails/grails-bin-0.3.1.zip

    You can work through the book verbatim using the 0.3.1 Grails release and you can compare your progress with the example source code. Or, you can work through the book using the 0.4.2 Grails release, and you'll just need to note a few minor items discussed in the FAQ. If you'd like to see the example source code for working through the book with Grails 0.4.2, that's available as well as discussed in this post.

    I'm sorry to hear that you're having trouble with your custom batch script. You shouldn't need to write any custom scripts to get up and running with Grails. If you follow the steps in the book (or on grails.org), you should be good to go..

    Right before the download line, the website had a comment “You will almost certainly see errors after upgrading to 0.4 unless you run “grails clean” and then “grails upgrade” on your project after installing 0.4.2. The grails upgrade target is largely non-destructive but read the on-screen instructions carefully.”

    This comment refers to taking an existing, pre-0.4 Grails application and upgrading it to Grails 0.4. Since the book walks you through building the application from scratch, you won't have to worry about upgrading the app from a previous version.

    I hope this helps. Enjoy your time with Grails.

    Cheers,

    Jason