我在gemfile中添加了twitter引导轨(2.0.1),然后运行"bundle install"。接下来,我运行了"rails g bootstrap:install",一切都很好。为了生成布局,我做了以下操作,得到了一个错误:
My-MacBook-Pro:todo my$ rails g bootstrap:layout application fixed
Bootstrap helpers installs to application_helper...
insert app/helpers/application_helper.rb
create app/views/layouts/application.html.haml
(erb):67:in `block in template': undefined local variable or method `flash' for #<Bootstrap::Generators::LayoutGenerator:0x00000102bb2c10> (NameError)
from (erb):66:in `each'
from (erb):66:in `template'
from /Users/my/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/erb.rb:838:in `eval'
我该怎么处理?我正在运行rails 3.2.1、ruby 1.9.3p0,并且正在使用"haml rails"。
使用更新您的Gemfile
gem 'twitter-bootstrap-rails', :git => 'http://github.com/seyhunak/twitter-bootstrap-rails.git'