Configuring Grails on Ubuntu Linux

I’ve recently installed Ubuntu Linux on my laptop, and in order to get Grails running, had to do the following:

  1. Edit /etc/environment and set up environment vars for Groovy, Grails and Java:
    <code>
    GRAILS_HOME=/INSTALL_DIR/grails-0.2
    GROOVY_HOME=/INSTALL_DIR/groovy-1.0-jsr-05
    JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.06
    export GRAILS_HOME GROOVY_HOME JAVA_HOME
    PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11: /usr/games:$GRAILS_HOME/bin:$GROOVY_HOME/bin"
    </code>

    This file was new to me on Ubuntu, I’m used to defining env vars in a .profile file. In order to get the new vars setup, source the file – ‘source environment’.

  2. After the previous step, the included script files with Grails needed to be changed to executable in order to run. cd into the grails directory, and then ‘chmod +x’ for both INSTALL_DIR/bin/grails and INSTALL_DIR/ant/bin/ant

infoq.com – the ‘new’ serverside.com?

www.infoq.com, a software development news and article site, covering Java, .NET, Ruby, SOA and Agile methodologies, officially launched yesterday, after having been running in beta for a while.

The site was co-founded by Floyd Marinescu, who was the original founder of www.theserverside.com, before they merged with Tech Target.

So far I like what I see on infoq – I hope they keep up the momentum and keep the articles coming. This looks a lot like what www.theserverside.com used to be like 4 or 5 years ago. TheServerSide used to be ‘the’ portal site for all things J2EE, but it lost momentum I think after Floyd left, followed by Ed Roman who was the CEO of The Middleware Company, the company behind TheServerSide.com. Since that point I have gradually lost interest in the content on TheServerSide, they usually don’t have anything that catches my eye – they aggregate news story headlines (which I do myself anyway on this site), but they are missing the articles and interviews that they used to have. Plus they used to be a thriving community with many contributions from people in the community – check the site now and see how few submissions they have from anyone other than those connected with the site.

infoq.com on the otherhand looks like they are off to a good start… I’m this close to replacing my TheServerSide.com link with infoq.com …

Moving to Ubuntu Linux

I’ve dual-booted my laptop for the past few years between XP and Fedora Core Linux, although I had such a hard time setting up the wifi drivers and WPA-Supplicant support that I admit I rarely used Linux on my laptop, despite running my website(s) entirely on Fedora Core Linux.

I decided to download and give Ubuntu Linux a go, since of all the Linuxes I’ve read that this is the most user friendly and easy to setup.

From the 1 CD ISO image (compared to 4+ for Fedora Core), Ubuntu has an awesome approach – you can either boot from the ‘Live CD’ similar to the Knoppix approach and run just from the CD, or select the installation option once you’ve tried it out from the Live CD, and install to your hard drive.

The installation was quick and simple, and all my laptop devices were instantly supported (touchpad mouse etc). The only install issue I had was the ATI driver config for X Windows – it wouldn’t go into 1600×1200 mode without a lot of screen corruption. Following the instructions here solved these issues after following the first section.

There were a couple of quirks – apparently root access is not configured during installation, so you can configure the root password using these instructions.

Secondly, I couldn’t initially find a Java JDK download for Ubuntu, without jumping through hoops to modify a downloaded .rpm file. Fortunately, following on from the JDK license change annoucements at JavaOne2006 this year to make the license more Linux friendly, a Ubuntu-friendly Java5 download is available – instructions here.

Next up – download, install and configure Netbeans, JBoss, and Glassfish, plus Groovy and Grails. I’ll give an update on these later.