Search code examples
rubyrubymine

Rubymine can't recognize ruby file


The file attendance_statistics_controller.rb can't be recognized as a ruby file. All other files can and when i change the name to anything else this one can aswell. It has nothing to do with the length of the filename.

enter image description here

The image on top shows how the ruby file is recognized as a textfile. Changing the name does the trick as shown on the one on the bottom.

enter image description here

Is it a bug in the application or is there something to do about it?


Solution

  • The file name has been registered as being a .txt file

    To fix this:

    1. Go to Rubymine | Preferences | Editor | filetypes.
    2. Find the Text file type in the list of recognized filetypes and click it.
    3. Then browse the registered patterns in the box just below and find the file name.
    4. Click it and remove it with the minus(-) button.
    5. Apply changes.