Play2Torial + Play 2.0.3 + Heroku + Postgresql - 无法在推送时构建

时间:2012-09-15 16:24:50

标签: java scala heroku build playframework-2.0

通过James Ward的Play2Tutorial工作,我完成了最后一步,添加Postgresql数据库并推送到Heroku。

我按照他的建议编辑了Build.scala文件:

val appDependencies = Seq(
    "com.github.twitter" % "bootstrap" % "2.0.2",
    "postgresql" % "postgresql" % "9.1-901-1.jdbc4"
  )

并修改了我的Procfile:

web: target/start -Dhttp.port=${PORT} -DapplyEvolutions.default=true -Ddb.default.driver=org.postgresql.Driver -Ddb.default.url=$DATABASE_URL ${JAVA_OPTS}

编译器没有返回localhost上的任何错误,Heroku postgresql似乎被添加好了,  但是" git push heroku master"在最后一刻失败了:

[info] Resolving org.scala-sbt#precompiled-2_9_2;0.11.3 ...
   [info] Done updating.
   [info] Compiling 1 Scala source to /tmp/build_3r8l8m531s747/.sbt_home/.sbt/plugins/target/scala-2.9.1/sbt-0.11.3/classes...
   [info] Loading project definition from /tmp/build_3r8l8m531s747/project
   [error] /tmp/build_3r8l8m531s747/project/Build.scala:12: ')' expected but string literal found.
   [error]         "postgresql" % "postgresql" % "9.1-901-1.jdbc4"
   [error]         ^
   [error] one error found
   [error] {file:/tmp/build_3r8l8m531s747/project/}default-f03173/compile:compile: Compilation failed
   Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?  !
Failed to build app with sbt!
Heroku push rejected, failed to compile Play 2.0 - java app

To git@heroku.com:********
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:********'

代码是文字的复制和粘贴,我之前已经使用过(完成本教程而没有发生任何事故)。

非常感谢您提供的任何建议。

谢谢, 芯片

1 个答案:

答案 0 :(得分:1)

看起来在Heroku上找不到Build.scala文件中依赖项的分隔逗号。您确定已将最新版本的Build.scala文件推送到Heroku吗?