commontator icon indicating copy to clipboard operation
commontator copied to clipboard

uninitialized constant WillPaginate::ActionView

Open jdugarte opened this issue 3 years ago • 2 comments

I'm getting this error in production:

app/helpers/commontator/link_renderer.rb:1:in `<main>': uninitialized constant WillPaginate::ActionView (NameError)

and I can't figure out how to fix it. Any clues?

Rails: 6.1.3.2 Ruby: 2.7.3

jdugarte avatar Jun 06 '21 18:06 jdugarte

I was having this same issue, but I fixed it. Copy over the commontator helpers with the command "rails commontator:copy:helpers" then at the top of app/helpers/commontator/link_renderer.rb add

require 'will_paginate/view_helpers/link_renderer' require 'will_paginate/view_helpers/action_view'

I also changed WillPaginate::ActionView::LinkRenderer to WillPaginate::ViewHelpers::LinkRenderer and added will_paginate to my gemfile to make sure it got installed on the production server.

Hope this helps!!

ledzep443 avatar Aug 17 '21 10:08 ledzep443

Works for me, so submitted a pull request. I'm using rails 6.1.4. Works with only adding the require statements, nothing else.

ledzep443 avatar Aug 21 '21 00:08 ledzep443