How do I fix an incorrect file association?

In RubyMine, I somehow indicated that foo.rb was NOT a Ruby file and now RubyMine is convinced that that file is not Ruby. I've deleted the file and recreated it, renamed it, removed the project: deep in the bowels of RubyMine it is convinced that the file is something other than Ruby. What's worse: all files now named foo.rb (and there are several, well, with real names) have the same problematic association.

If someone can help on this, I'll be extremely grateful!


Comment actions Permalink

Open Settings -> Editor -> File Types.

In the list find Ruby and add *.rb pattern to the "Registered Patterns" list

Comment actions Permalink

Thanks a lot for your response!

I'm afraid it didn't work. *.rb was already there, so I tried removing it and readding it, but the file that has lost the association still has it missing. It's as though RM has logic that says: apply *.rb to all file except those on this list and for those files do something different.

Just to be clear: it's not the problem that RM doesn't recognize Ruby files, it's just that files call foo.rb (irrespective of where they appear in the directory tree) have now lost the association with Ruby.

Comment actions Permalink

With a little more digging, I discovered that "foo.rb" showed up as a registered pattern under text files. When I removed it, all was well again.

Thanks, Andrey, for pointing me in the right direction.


Please sign in to leave a comment.