加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – formtastic-bootstrap安装

发布时间:2020-12-17 02:43:43 所属栏目:百科 来源:网络整理
导读:我刚刚为 Ruby on Rails和Twitter Bootstrap安装了formatastic-bootstrap gem.根据自述文件,我在application.css中添加了* = require formtastic-bootstrap,我创建了一个名为config / initializers / formtastic.rb的文件,其内容为Formtastic :: Helpers ::
我刚刚为 Ruby on Rails和Twitter Bootstrap安装了formatastic-bootstrap gem.根据自述文件,我在application.css中添加了* = require formtastic-bootstrap,我创建了一个名为config / initializers / formtastic.rb的文件,其内容为Formtastic :: Helpers :: FormHelper.builder = FormtasticBootstrap :: FormBuilder,我运行捆绑安装.当我尝试现在启动我的rails服务器时,我收到以下错误.

/Users/wrightgd/.rvm/gems/ruby-1.9.3-p0/gems/formtastic-bootstrap-1.1.1/lib/formtastic-bootstrap/helpers/buttons_helper.rb:5:in
`’: cannot load such file —
formtastic/helpers/buttons_helper (LoadError)

我在这做错了什么?提前感谢您的帮助!

解决方法

根据 this最新版本的formtastic与formtastic-bootstrap不兼容.试试旧版宝石’formtastic’,“?> 2.1.1”

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读