Does anyone know how to fix this?

Make sure the very first line in that migration file is a comment, like this:

# frozen_string_literal: true

This is a special kind of thing known as a “magic comment”.

1 Like