I notice that when I convert an app into a RubyMine project, the root .gitignore file is modified with the addition of "/.idea/". This modification then gets saved into git so that everyone gets the modification to their .gitignore.
I think there is a far simpler and better option. Add a .ignore file to the .idea directory with this content (.idea/.ignore):
The advantage of this approach is that it is invisible to the rest of the project and everyone else working on the project. It means that project .gitignore does not get cluttered up with everyone's chosen IDE exclusion code. It also means your are not vulnerable to someone else deciding to tidy up the root .gitignore, and suddenly making your RubyMine project files visible to git.