未初始化的常量 ActionView::CompiledTemplates::BootstrapPagination [英] uninitialized constant ActionView::CompiledTemplates::BootstrapPagination

查看:62
本文介绍了未初始化的常量 ActionView::CompiledTemplates::BootstrapPagination的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了 will_paginate-bootstrap gem 来使用 bootstrap 风格的分页.我认为:

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 %> 

但它返回此错误

    uninitialized constant ActionView::CompiledTemplates::BootstrapPagination

推荐答案

如果您已经成功地捆绑了所有 gem,那么它应该像这样工作.

If you have successfully bundle all the gems then it should work like this.

<%= will_paginate @mylist, :renderer => BootstrapPagination::Rails %>

请确保您在安装 gem 后重新启动了服务器.

Please make sure you have restarted the server after installing the gem.

这篇关于未初始化的常量 ActionView::CompiledTemplates::BootstrapPagination的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆