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!
THANK YOU!!! This has been driving me crazy
Yes! I too was having problems. Now, I have a new problem.
After making the changes, “routes” is fixed but now “index()” is red. ugh!
Respect
You finished my pains
My hero!
I hate that the IDE said “problems?”, but that it works.
*Bows*
Thank you all for your comments.
This is spot on! Can’t believe after all this time this is still an issue (1 year later). JetBrains get your stuff together! (Thanks Jens!)
THX! You helped me ;) Thank you.
Looked around for a while and messed with settings and came across this. Thank you.