Installing Grails on Mac OSX Leopard
Posted by e. | Filed under Grails, Technology
Here’s a quick tutorial to get Grails up and running on your Mac OSX machine:
- Download the latest Binary from here.
- To keep it clean, let’s unpack the archive and move the folder to /usr/share. Open up a terminal window and type:
$ sudo mv ~/Downloads/grails-1.1 /usr/share - Change the permissions on these files
$cd /usr/share
$sudo chown -R root:wheel grails-1.1/
$sudo chmod 0755 grails-1.1/bin/*
- Let’s create a symlink to the grails directory
$ln -s grails-1.1 grails - Finally, let’s add the GRAILS_HOME var to our ~/.profile file and point it to the symlink that we just created. If you’re like me, and don’t find vi particularly easy to use, here’s an easy way to edit your .profile file using TextEdit
open ~/.profile
If for some reason TextEdit is not the default application for this type of file, you can force it to open this file by typingopen -a TextEdit ~/.profile
Here’s an example of what a .profile file might look like when GRAILS_HOME is added:GRAILS_HOME=/usr/share/grails; export GRAILS_HOME
export PATH=/opt/local/bin:/opt/local/sbin:$GRAILS_HOME/bin:$PATH - That’s it! Let’s test it out. Type in grails in the Terminal and you should see the following output.
$grails
Welcome to Grails 1.1 - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: /usr/share/grails
No script name specified. Use ‘grails help’ for more info or ‘grails interactive’ to enter interactive mode
2 Responses to “Installing Grails on Mac OSX Leopard”
-
poesco Says:
May 7th, 2009 at 1:32 pmHi, Looks good, but when I try to vreate the symlink it gives me ‘ln: grails: Permission denied’. Any idea?
thnx,
Poesco -
e Says:
May 10th, 2009 at 1:34 amHey poesco,
did you try $sudo ln -s grails-1.1 grails? If that doesn’t work make sure to check if you changed the permissions in the previous step:
$sudo chown -R root:wheel grails-1.1/
$sudo chmod 0755 grails-1.1/bin/*Thanks!