If you have an existing codebase in PHP, Hack provides a backwards compatible way to improve the state of things.
I have experienced both cases: a conversion of a large codebase from php to Hack and also a conversion from php to rails. Pick the right tool for the right job.