Rails 5 issue: Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:
KelseyDH opened this issue · 0 comments
KelseyDH commented
StandardError: An error has occurred, this and all later migrations canceled:
Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:
class CreateDoubleEntryTables < ActiveRecord::Migration[4.2]
/APP_NAME/db/migrate/20171128034808_create_double_entry_tables.rb:1:in `<top (required)>'
/APP_NAME/config/initializers/task.rb:7:in `execute'
As the error message recommends, I was able to fix this for Rails 5 by specifying the correct version in the migration (currently it just outputs class CreateDoubleEntryTables < ActiveRecord::Migration
).
This seems like an easy PR to bring in, and would prevent people from shooting themselves in the foot when adding this gem for the first time.