[error] DeviceAffiliationCluster.scala:56: value ask is not a member of akka.actor.ActorRef
[error] def ask(msg: Any): Future[Any] = deviceRegion.ask(msg)
[error] ^
[warn] DeviceAffiliationCluster.scala:5: Unused import
[warn] import akka.pattern.ask
akka.pattern.ask supplies an implicit conversion (from ActorRef to AskableActorRef, the latter which provides the method ask)
When I compile using sbt, however, the conversion is NOT recognized. (Intellij sees the implicit conversion and has no issue with it, but I'm using sbt to build.)
I can get it to work explicitly:
val deviceRegion: ActorRef = ...
val deviceRegionAskable: AskableActorRef = deviceRegion
the problem is that your method
askis hiding the ask method which you imported fromakka.pattern.askIf you use a different method name then your example works fine