mbleigh / acts-as-taggable-on

A tagging plugin for Rails applications that allows for custom tagging along dynamic contexts.
http://mbleigh.lighthouseapp.com/projects/10116-acts-as-taggable-on
MIT License
4.98k stars 1.19k forks source link

StandardError: Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for: #865

Closed kuwze closed 7 years ago

kuwze commented 7 years ago

I am getting the following error when trying to use this gem:

StandardError: Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:

The setup: I have

gem 'acts-as-taggable-on', '~> 4.0'

in my Gemfile.

I run:

rake acts_as_taggable_on_engine:install:migrations

(which works fine)

rake db:migrate

(which fails and spits out that error)

I resolved it by following the instructions here[0] for annotating the migration files that acts-as-taggable-on generates.

[0] https://github.com/RolifyCommunity/rolify/issues/444

kuwze commented 7 years ago

Also this error goes away with

gem 'acts-as-taggable-on', '~> 5.0'