How to install the Play! Framework on OS X?

You can not run the play executable from the desktop. You must run it from an open terminal window. Go to Applications -> Utilities and start Terminal.

Furthermore you need to add play to your PATH:

mkdir ~/bin
ln -s <path to your play home>/play ~/bin
echo "export PATH=~/bin:$PATH" >> ~/.bashrc
. ~/.bashrc

Now you can run

play new appname

from the Terminal window.


UPDATE 2015: The play command has been superseded by Typesafe Activator.

If you have homebrew installed then you can do 'brew install typesafe-activator' to install Typesafe Activator. This will allow you to use 'activator' commands instead of play commands.

It's also worth noting that most commands you would use are available directly from sbt. Personally, I would only use activator to create a blank project. From then on, I do day-to-day tasks from sbt. (E.g. 'sbt ~run' to run the play app in dev mode, with the ~ so it is reloaded every time a file changes.)


Old answer from 2012:

The easiest way is to use MacPorts or Brew. If you have brew installed, you can just run:

brew install play

Creating a bin folder, containing a symlink, which is on your path is also a good idea - as Andre suggested. It involves a few steps, but you will likely want to easily add more applications to your path in future.