Sunday, June 14, 2009

Grails Day 1

I've been living like an itinerant for nearly 6 months now. I've really been enjoying it, but my funds are beginning to run dry.

I was looking for work, half-arsedly because I neither want to take something too uninteresting nor make an on going commitment, when someone suggested freelancing programming work.

so poking around elance.com to get a smell of what was going i saw it's largely websites...

considering that I have mostly experience with java, and have recently been using groovy. decided to give grails a try...

reading the various introductions I learn grails will magically configure itself, install as easily as opening an envelope, and provide me with massive gains in productivity by not tiring my fingers writing too much code...

sounds fantastic.

I set about installing it on my Asus eee runing ubuntu eee.

I download the latest grails release from grails.org and follow the installation instructions. this proceeds smoothly.

then following the quickstart tutorial I run into my first error. trying to run the >grails create-app

immediately throws an error about 'JAVA_HOME' not being set correctly. this is a pretty nube error, one that had been a nucance to me for some time.

of course I had a line setting java home in my .profile:

JAVA_HOME=~/java/jdk1.6.0_13/

but, it didn't seem to work. it worked when I ran the above expression from the command line, but not when the line was inside a script. unless I ran it with the command :

>. setjavahome.sh

>sh setjavahome.sh
did nothing.

when you run a script with "sh" or "bash" it is as if it creates a new terminal and runs it in that. if you run it with "." it is as if it runs it in the current terminal.

later I realise that the problem is I need to use the command "export".

export JAVA_HOME=~/java/jdk1.6.0_13/

thats the first thing I learned today.

after that workaround I get through the first Mastering Grails tutorial easily.

I am beginning to get excited about having full control of the awesome power of grails when I hit a brick wall...

No comments:

Post a Comment