has-friendship / has_friendship

Add friendship to ActiveRecord models
MIT License
198 stars 98 forks source link

rails db:migrate failing #55

Closed dharshan closed 6 years ago

dharshan commented 6 years ago

Hi,

I am using

Rails 5.1.6
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]
has_friendship-1.1.1

While trying to run migration, it is giving bellow error

rails aborted!

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 CreateFriendships < ActiveRecord::Migration[4.2]

Though it can be cleared by overriding all the has_friendship migration files by inserting appropriate rails version like bellow

class CreateFriendships < ActiveRecord::Migration[5.1]
# 
end

Was it missed from the gem or did I missed anything while installing gem?

khatanark commented 6 years ago

Hi! I want to resolve this issue.

chevinbrown commented 6 years ago

@khatanark, this is a duplicate of https://github.com/sungwoncho/has_friendship/issues/53