Posted over 1 year ago. Visible to the public.

Rubymine FileType mismatch

If your Rubymine does not recognize a file type correctly although you have entered the unmistakeable file extension like material_orders_controller.rb, this may help you:

Causing the Problem

Sometimes you create a new file and forget to enter the ending like material_orders_controller
Rubymine handles such files per default as simple txt files.
You delete this file and create a new one with correct ending: material_orders_controller.rb. But still Rubymine treats this file as text file, no highlighting is available.

What happened?

Rubymine saves file name patterns to assign the correct file types. *.rb for example is one pattern to identify ruby files. But why does Rubymine not identify your file correctly although it matches this pattern?

Because Rubymine tries to remember types for "new" files which don't match any pattern. So it happens that it saves a pattern for material_orders_controller and assigns it to txt file type.


a) Don't delete and recreate the file. Only change the exiting file's name and add the correct extension.
b) If already happend: Remove the pattern from txt file type patterns Rubymine:

File -> Settings -> Editor -> File Types -> Text

By refactoring problematic code and creating automated tests, makandra can vastly improve the maintainability of your Rails application.

Owner of this card:

Natalie Krehan
Last edit:
over 1 year ago
by Natalie Krehan
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Natalie Krehan to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more