我想使用gem 'exception-track'
,但是它与gem Kiminari
有依赖性,这似乎与我已经使用的gem will_paginate
不兼容。
我的错误是:
"errors": "undefined method `paginate' for
我已经尝试在互联网上的initializer
中添加一些可修复Exception-track
界面的配置,但仍然无法使用will_paginate
:
if defined?(Willpaginate)
module Willpaginate
module activeRecord
module Relationmethods
def per(value = nil) per_page(value) end
def total_count() count end
def first_page?() self == first end
def last_page?() self == last end
end
end
module Collectionmethods
alias_method :num_pages,:total_pages
end
end
end
我的配置中缺少什么?