os-patches
os-patches copied to clipboard
Ruby files always detected as Ruby on Rails
When opening a .rb
file, Code selects "Ruby on Rails" as the programming language for syntax highlighting, but the file is not part of a Rails project. Not sure why Code isn't choosing "Ruby" (which is available as well) - tried with different files, they're always interpreted as "Ruby on Rails".
From what I can tell so far this is caused by a patch made on top of gtksourceview specific to elementary-os.
It adds a new language spec at /usr/share/gtksourceview-3.0/language-specs/ruby_on_rails.lang which matches *.rb files. gtksourceview therefore can't distinguish between Ruby/RubyOnRails for *.rb files.
Whatever the reason, I can assure you it'll flip off a good number of Ruby developers who usualy wish to be left alone with Rails.
Closing because we no longer patch gtksourceview since OS 7, and I confirmed Code detect .rb files as "Ruby" on OS 8 Early Access.