2016-09-10 28 views
2

acts_as_follower gem在Rails4中正常工作,但它不工作Rails5。 https://github.com/tcocca/acts_as_followeracts_as_follower gem在rails5中不能正常工作

當我整合,並嘗試使用跟蹤功能控制檯我得到了以下錯誤:

user = User.find(1)

user2 = User.find(2)

user.follow(user2)

如果使用sqlite3的數據庫,我得到了以下錯誤:

no table found error will be display

如果您正在使用pg數據庫,我得到以下錯誤:

TypeError: no implicit conversion of nil into String

這個演示的源代碼包含act_as_follow寶石與rails5 https://github.com/jigarbhatt2711/act_as_follow_demo

回答

2

通過改變我的寶石從

gem "acts_as_follower" 

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

問題解決了!

相關問題