Posted 3 months 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.

Solutions

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

Does your version of Ruby on Rails still receive security updates?
Rails LTS provides security patches for old versions of Ruby on Rails (3.2 and 2.3).

Owner of this card:

Avatar
Natalie Krehan
Last edit:
3 months 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 cookies to improve usability and analyze traffic.
Accept or learn more