2012-02-21 81 views
1

我將twitter-bootstrap-rails(2.0.1)添加到我的gemfile中,然後運行「捆綁安裝」。接下來我運行「rails g bootstrap:install」,一切都很好。要生成佈局,我做了以下並得到一個錯誤:Twitter引導軌錯誤。 「未定義的局部變量或方法`閃光燈」

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'。

+0

打開GitHub上存儲庫的問題嗎? – shingara 2012-02-21 09:01:23

回答

2

更新您的Gemfile與

gem 'twitter-bootstrap-rails', :git => 'http://github.com/seyhunak/twitter-bootstrap-rails.git'

+3

做完這些之後,我還不得不從'group:assets'中刪除gem以使其工作:https://github.com/seyhunak/twitter-bootstrap-rails/issues/338#issuecomment-17107619。 – 2013-05-23 01:52:14

+0

完美!工作 – 2014-04-22 18:03:46

相關問題