Rubymine says this is invalid ruby code


I am new to ruby and rails and am working on my for my first commit. I have this subheader:


Rails defaults to using SQLite for the database. If you would prefer to use another database driver you will need to edit config/database to point to your database. Here is an example configuration for PostgreSQL:

default: &default
  adapter: postgresql
  encoding: unicode
  pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
  username: myapp
  password: password1
  timeout: 5000

  <<: *default
  database: ookmakyi_dev

  <<: *default
  database: ookmakyi_test

  <<: *default
  database: ookmakyi

However I noticed RubyMine isn’t highlighting my code and when I check it is giving me these errors related to my database example:

Expected: ; or end of line :32 Unexpected: a& :32 Expected: ; or end of line :33 Expected: ; or end of line :34 Expected: ; or end of line :35 Unexpected: < :35 Expected: string end :50

Is it correct?

I don’t use RubyMine, but it sounds to me as though it is guessing that this file is Ruby code, and trying to validate it in that context, rather than reading the filename extension and parsing it as Markdown. See if there is a control in the editor somewhere to tell it (firmly) that this is Markdown. The validation errors should go away, and you may even see that it properly previews the Markdown, too.