Install Grails on Mac OS X 10.7 Lion

  1. Download and Install the Java Software Development Kit (SDK).
    1. log on to
    2. Search for “Java for Mac OS X 10.7 Developer ” on the downloads page
    3. Download and Install the latest. This will be a .pkg type install (not click and drag)
  2. Install Grails
    1. Go to
    2. Download the “Binary Zip” under the current release.
    3. Unzip the downloaded file, and move to /Applications/Dev (or wherever you like), take note of the directory name.
  3. Add Environment Variables
    1. Open/Create /etc/launchd.conf
      sudo nano /etc/launchd.conf
    2. Add the following lines: (make sure to reference the proper directory names)
      setenv JAVA_HOME /Library/Java/JavaVirtualMachines/[VERSION].jdk/Contents/Home
      setenv GRAILS_HOME /Applications/Dev/[GRAILS VERSION]
    3. Save and Exit
    4. Add execute permissions
      sudo chmod +x /etc/launchd.conf
  4. Append reference to the grails /bin directory to the path
    1. Create a new path file
      sudo nano /etc/paths.d/grails
    2. Insert the following lines
      /Applications/Dev/[GRAILS VERSION]/bin
    3. Save and Exit
  5. Restart the computer
You should be able to type ‘grails’ at the command prompt and get a response.

3 thoughts on “Install Grails on Mac OS X 10.7 Lion

  1. I’m not. I just wanted the challenge 🙂

    Actually, I’m doing JavaScript on a Grails app as a side project.

Leave a Reply

Your email address will not be published. Required fields are marked *