Scala Play 2 on IntelliJ (OSX)

Instal scala and play

Instal scala and play on your machine using brew (if not done yet):

brew update
brew install scala
brew install play


Create New Application (also applicable to modifying existing one)

Create New Application (ref).

Create a project

play new YOUR-APP

To generate IntelliJ project do the following (ref) :

idea with-sources=yes


IntelliJ Run Config

Now just open an IntelliJ project that was created in the YOUR-APP directory.

To make sure that there are not issue make it ‘Build / Make Project’

To run it you need to create a new profile, ‘Run / Edit Configurations’, click ‘+’ and select ‘Play 2 App’.   Now you can run it with ‘Run/Run’

Various Issues

IntelliJ broke the project

After starting IntelliJ; it offered to “fix the project /  import project” since it detected Build.scala and sbt.

Import project 
project/Build.scala' seems to be SBT build file, but there is no external project related to it.
 Import the corresponding project?
           Import project

After letting it do that; the project would no longer compile

scala: Output path is shared between: Module production Please configure separate output paths to proceed with the compilation. TIP: you can use Project Artifacts to combine compiled classes if needed.

Luckily I was able to find an easy way of fixing it.

cd into you project (from terminal); and then launch play.  You might want to make sure that the project runs by executing “run”.  Afterwards you can execute “idea” from within plan; and it will recreate the IntelliJ project for you.  Then you just need to follow instructions above.  Note: first thing you would need to do is to Build/Make Project; then add run config, etc.





keywords: play2 play os x mac

intellij Class not found: “ApplicationSpec”

object index is not a member of package views.html


About Neil Rubens

This entry was posted in Uncategorized. Bookmark the permalink.

One Response to Scala Play 2 on IntelliJ (OSX)

  1. Pingback: IntelliJ: building Play Scala project | Active Intelligence

Leave a Reply

Your email address will not be published. Required fields are marked *