Bootstrap and Rails issue with Heroku deployment

I am creating a Ruby on Rails application. I have included gem. While checking the application locally, I tried repeatedly to deploy it to Heroku. I first encountered this 500 error:

ActionView::Template::Error (images/apple-touch-icon-144x144-precomposed.png isn't precompiled) 

I solved this initial problem by adding this line to the config / environment / production.rb file.

 config.assets.compile = true 

Now I'm trying to reconnect the rail application to Heroku, but when I click on Heroku I get this 500 error again. I don’t know how to solve this problem:

 ActionView::Template::Error (undefined local variable or method `bootstrap_flash' for#<# 77: </div><!--/span--> 79: <%= bootstrap_flash %> 78: <div class="span9"> 80: <%= yield %> app/views/layouts/application.html.erb:79:in `_app_views_layouts_application_html_erb___2619453860724409461_34912060' 81: </div> 82: </div> 

Any help would be greatly appreciated!

This is my gemfile:

 source 'https://rubygems.org' gem 'rails', '3.2.13' # Bundle edge Rails instead: # gem 'rails', :git => 'git://github.com/rails/rails.git' gem 'pg' gem 'devise' # Gems used only for assets and not required # in production environments by default. group :assets do gem 'sass-rails', '~> 3.2.3' gem 'coffee-rails', '~> 3.2.1' # See https://github.com/sstephenson/execjs#readme for more supported runtimes # gem 'therubyracer', :platforms => :ruby gem 'uglifier', '>= 1.0.3' gem "therubyracer" gem "less-rails" gem 'twitter-bootstrap-rails', :git => 'http://github.com/seyhunak/twitter-bootstrap-rails.git' end gem 'jquery-rails' 

I tried rake assets:precompile and then uploaded to Heroku, but still no luck.

+4
source share
1 answer

You seem to have this previously reported issue . Try adding the following stone:

 gem 'bootstrap_helper' 

You can also add this file as one of your helpers. This is what is fixed for most people in this thread.

+5
source

All Articles