will_paginate undefined method. The Will_paginate gem appears to work though

后端 未结 1 388
鱼传尺愫
鱼传尺愫 2021-01-22 04:06

I\'m using rails 2.3.8

my error:

undefined method `will_paginate\' for #

in environment.rb:

相关标签:
1条回答
  • 2021-01-22 04:55

    Disable the auto-requiring of will_paginate:

    # Gemfile
    gem "will_paginate", "~> 2.3.15", :require => nil
    

    And require it yourself, manually, at the end of environment.rb:

    # end of environment.rb
    require "will_paginate"
    

    The thing is, if you require will_paginate before the Rails::Initializer call, it might not boostrap properly.

    0 讨论(0)
提交回复
热议问题