Reputation: 616
Using the very latest version of the Play Framework (v2.3) on JDK 8 on Mac OS X and IntelliJ IDEA as my IDE.
While Play correctly recompiles my project source code in the background I never see any change in the browser until I restart the app. I have imported the exact same project on another Mac with all the same software and see it working correctly.
I tried everything I could find online, including run vs ~run and using the new parameters for native vs SBT watcher service. I doubt it's an issue with that as I see lines like this one a few seconds after I change anything in my code:
[info] Compiling 1 Java source to /Users/patrick/IdeaProjects/play-slick-bootstrap3/target/scala-2.11/classes...
Crucially, when I hit refresh on my other computer, I get a message saying reload detected etc.
Any help with this would be much appreciated.
Upvotes: 3
Views: 2577
Reputation: 2705
so what I have done to solve the problem is:
Stop running in Console.
Go to IntelliJ.
Run -> Edit Configuration
click + button -> add SBT Task
In Tasks: type run
Click Apply and its running like a charm...
Upvotes: 0
Reputation: 616
This turned out to be a Mac OS X bug caused in some scenarios where the path that is being monitored for changes has 'issues' with case sensitivity. More information on this issue can be found here
I ran the find-fsevents-bugs application linked to from the above link and it turned out that my home directory path's case was upper-case but showed as lower-case in the Finder. Apparently, this causes Mac OS X to never fire events for anything under this directory - so in my case, nothing was working. I renamed the home directory to lower upper-case via the command line and it started working.
Hope this will be useful to someone else!
Upvotes: 2