play scala urlの取得方法
controller内で
request.host = ホスト取得
request.path = パス取得
http://www.playframework.com/documentation/2.1.5/api/scala/index.html#package
これの読み方よくわからない。。。。。
play2.2系にbootstrap3系を入れる方法
build.sbtに直接bootstrapいれてという記述をしたらなぜか怒られた
ので
play.Keys.lessEntryPoints <<= baseDirectory { base =>
(base / "app" / "assets" / "stylesheets" / "bootstrap" * "bootstrap.less") +++
(base / "app" / "assets" / "stylesheets" / "bootstrap" * "responsive.less") +++
(base / "app" / "assets" / "stylesheets" * "*.less")
}
をbuild.sbtに記述し、
参考サイトにあるgitのリンクからzipをダウンロードしてassetの部分を
"プロジェクト名/asset"以下に置いたらできた
念願のフラットデザイン!!!
参考:http://stackoverflow.com/questions/21551602/play-2-2-1-twitter-bootstrap-3-less-setup
mysqlユーザー作成と権限の付加
rootでデータベース作成
↓
rootでユーザー作成
↓
作成したユーザーに権限を付与
参考:http://wiki.minaco.net/index.php?MySQL%2F%E3%83%A6%E3%83%BC%E3%82%B6%E3%81%A8DB%E4%BD%9C%E6%88%90
Play For Scala つまずいたところ
routeで
'GET /products/new'を‘GET /products/:ean'の後ろに記述しないとエラーがでる
参考:http://www.manning-sandbox.com/thread.jspa;jsessionid=f0HFJnZp0s7PO1E7?messageID=131178𠁪
The route for ‘GET /products/new’ has to be before the route for ‘GET /products/:ean’ - the first route in the file matches, and if you have them the wrong way around, /products/new matches the other route, and the router tries to parse 'new' as the Long ':ean' parameter.
よくわからない、、、
Homebrewでインストールしたときのインストール先のパス
/usr/local/Cellar