I have installed the will_paginate-bootstrap gem to use bootstrap style pagination. I have this in my view:
<%= will_paginate @mylist, renderer: BootstrapPagination::Rails %>
but it returns this error
uninitialized constant ActionView::CompiledTemplates::BootstrapPagination
If you have successfully bundle all the gems then it should work like this.
<%= will_paginate @mylist, :renderer => BootstrapPagination::Rails %>
Please make sure you have restarted the server after installing the gem.
If you use gem will_paginate-bootstrap with rails 4.0 or later, you must have it available on all stages. See Rails Upgrade Guide 3.2 to 4.0. Before Rails 4.0 this was fine, to have it only in assets.
This is right for rails 3.X or earlier:
gem 'will_paginate-bootstrap', group: :assets
It must be outside of any groups (on rails 4.0 and later):
gem 'will_paginate-bootstrap'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With