Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrations files needs to inherit from ActiveRecord::Migration[RAILS_VERSION] #19

Closed
loicginoux opened this issue Jun 13, 2017 · 4 comments

Comments

@loicginoux
Copy link

loicginoux commented Jun 13, 2017

When running bundle exec rails g solidus_related_products:install

I had the following error:

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

  class CreateRelationTypes < ActiveRecord::Migration[4.2]

I had to add the my current rails app version to all the generated migration files like this for example:

class CreateRelationTypes < ActiveRecord::Migration[5.1]

See https://github.com/solidusio/solidus/wiki/Testing-extensions-against-multiple-Solidus-versions#migrations

@prdanelli
Copy link

prdanelli commented Feb 21, 2018

The gem can no longer be installed with Solidus (2.4.2) because of this issue.

@askl56
Copy link

askl56 commented Apr 26, 2018

@prwhitehead has this issue been resolved?

@prdanelli
Copy link

Looks like I cloned the repo: builtbybuffalo@46542b5

@aitbw
Copy link
Contributor

aitbw commented Apr 26, 2019

Closed via 9027e60

@aitbw aitbw closed this as completed Apr 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants