There's another reason for a file not being coloured in. I've found RubyMine can get stuck analyzing a file, and then it doesn't colour it in. For me this happens on .html.slim files when RubyMine gets confused translating/fetching keys from yml files, for example when implying yml files in both views and controller on a single view file.
Renaming the file appears to fix it, but that's because it no longer gets stuck resolving the yml files, but you think it's the file association problem.
Another way to test it is to comment everything out, using / in the case of slim. Then close file and re-open. It is then coloured for being commented. Remove the comments and it works because Rubymine doesn't try to resolve yml data after the file is opened. But closing then re-open and it gets stuck again as it gets confused.