Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

acts_as_follower gem is not working in rails5

acts_as_follower gem working fine in Rails4 but it is not working Rails5. https://github.com/tcocca/acts_as_follower

When I integrate and try to use follow function in console I got following error:

user = User.find(1)

user2 = User.find(2)

user.follow(user2)

If you are using sqlite3 database, I got following error:

no table found error will be display

If you are using pg database, I got following error:

TypeError: no implicit conversion of nil into String

This the source code of demo which contain act_as_follow gem with rails5 https://github.com/jigarbhatt2711/act_as_follow_demo

like image 939
Jigar Bhatt Avatar asked Dec 05 '25 21:12

Jigar Bhatt


1 Answers

By changing my gem from

gem "acts_as_follower"

to

gem "acts_as_follower", github: "tcocca/acts_as_follower"

issue resolved!

like image 140
Jigar Bhatt Avatar answered Dec 10 '25 23:12

Jigar Bhatt