brew update
brew play install
中略*
play run
_ _
_ __ | | __ _ _ _| |
| '_ \| |/ _' | || |_|
| __/|_|\____|\__ (_)
|_| |__/
play! 2.0.2, http://www.playframework.org
あれ?もう一度
brew play install
Error: play-2.0.4 already installed, it's just not linked
linkってなんぞ?とりあえずこんな感じか?
brew link play
Linking /usr/local/Cellar/play/2.0.4... Warning: Could not link play. Unlinking...
Error: Could not symlink file: /usr/local/Cellar/play/2.0.4/bin/play
Target /usr/local/bin/play already exists. You may need to delete it.
To force the link and delete this file, do:
brew link -f formula_name
To list all files that would be deleted:
brew link -n formula_name
違った!-fで前のバージョンを消す必要がある?
brew link -f play
Linking /usr/local/Cellar/play/2.0.4... 1 symlinks created
よし!
play -help
Getting net.java.dev.jna jna 3.2.3 ...
:: retrieving :: org.scala-sbt#boot-app
confs: [default]
1 artifacts copied, 0 already retrieved (838kB/39ms)
Getting Scala 2.9.1 (for console)...
:: retrieving :: org.scala-sbt#boot-scala
confs: [default]
4 artifacts copied, 0 already retrieved (19939kB/377ms)
Getting play console_2.9.1 2.0.4 ...
:: retrieving :: org.scala-sbt#boot-app
confs: [default]
5 artifacts copied, 0 already retrieved (3667kB/132ms)
_ _
_ __ | | __ _ _ _| |
| '_ \| |/ _' | || |_|
| __/|_|\____|\__ (_)
|_| |__/
play! 2.0.4, http://www.playframework.org
updateできた!
しかし、このままだとプロジェクトを起動すると下記のようなメッセージがでます。
This project uses Play 2.0.2!
Update the Play sbt-plugin version to 2.0.4 (usually in project/plugins.sbt)
どうやら、project下にあるplugins.sbtを編集する必要があるみたいです。
// Use the Play sbt plugin for Play projects
addSbtPlugin("play" % "sbt-plugin" % "2.0.4")
[info] Loading project definition from /Users/...
[info] Set current project to xxx (in build file:/Users/...)
_ _
_ __ | | __ _ _ _| |
| '_ \| |/ _' | || |_|
| __/|_|\____|\__ (_)
|_| |__/
play! 2.0.4, http://www.playframework.org
> Type "help play" or "license" for more information.
> Type "exit" or use Ctrl+D to leave this console.
[xxx] $
これで最新版が使えるようになりました!
*あとで調べたら"Error: The linking step did not complete successfully"みたいなことが書かれているらしいけどログが残ってない...