Today I updated an application to Play Framework 2.2. After the creation of the IntelliJ config with “play idea”, I got errors in every reverse route and content call. Here are some examples how the errors locked like:
After fiddling around a bit I found out that the routes_routing.scala and the routes_reverseRouting.scala had errors to. Hmm this is weird. A look in the module setting (Click on the project folder -> Open Module Settings) provided me this:
As you can see the folder target/scala-2.10/…/main is not a source folder. Only the underlying controllers and views folder. To fix the errors in the controllers just add “main” to the source folders and remove “controllers” and “views”.
Here is a screenshot how the fixed configurations should look like:
Now the controllers should be fine. Happy coding!