formtastic-bootstrap安装

Geo*_*ght 4 ruby-on-rails formtastic twitter-bootstrap

我刚刚为Ruby on Rails和Twitter Bootstrap安装了formatastic-bootstrap gem.根据自述文件,我添加 *= require formtastic-bootstrap到application.css,我创建了一个名为config/initializers/formtastic.rb其内容的文件Formtastic::Helpers::FormHelper.builder = FormtasticBootstrap::FormBuilder,我运行了bundle install.当我尝试现在启动我的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`':无法加载此类文件 - formtastic/helpers/buttons_helper(LoadError)

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

zis*_*she 7

根据这个最新版本的formtastic与formtastic-bootstrap不兼容.试试旧版本gem 'formtastic', " ~> 2.1.1"

  • 它现在可用了. (2认同)