2

I'm trying to use Scalate 1.6.1 with Play, but it gives me this:

[TemplateException: scala.reflect.internal.TreeInfo.firstArgument(Lscala/reflect/internal/Trees$Tree;)Lscala/reflect/internal/Trees$Tree;]

in this code in the ScalaIntegration.scala

def render(args: (Symbol, Any)*) = {
  ScalateContent{
    scalateEngine.layout(name, args.map {
      case (k, v) => k.name -> v
    } toMap)
  }
}

I know it can be a version problem, so I'm currently trying to run it with scala 2.10.0, but I would like then to change to 2.10.2 .

LowFieldTheory
  • 1,722
  • 1
  • 26
  • 39

2 Answers2

0

Instead of changing the scala version, try specifying the dependency versions for scala-reflect and scala-compiler explicitly by adding this in your sbt build.scala: (In my case I wanted to use 2.10.3)

libraryDependencies ++= seq(
"org.scala-lang" % "scala-reflect" % "2.10.3",
"org.scala-lang" % "scala-compiler" % "2.10.3"
)

This is based on Ross A. Baker's response here: https://groups.google.com/d/msg/scalate/rKNkwgHPQDM/ClfBTM1VyegJ

Zack
  • 540
  • 5
  • 12
0

Scalate 1.6.1 depends on scala-reflect functions that are missing in 2.10.3. Try Scalate 1.7.0 from the scalatra folks:

"org.scalatra.scalate" % "scalate-something" % "1.7.0"

Anyways, Scalate does't seem to be maintained well by the fusesource folks: https://groups.google.com/forum/#!topic/scalate/X_EcZEUk_lo

poroszd
  • 592
  • 4
  • 12