ActionView::Template::Error (undefined local variable or method `bootstrap_flash’ in production mode

Create a helper file as,   app/helpers/bootstrap_flash_helper.rb Add these snippet into the file, ——————————————————————————– module BootstrapFlashHelper ALERT_TYPES = [:error, :info, :success, :warning] def bootstrap_flash flash_messages = [] flash.each do |type, message| # Skip empty messages, e.g. for devise messages set to nothing in a locale file. next if message.blank? type = :success if type == :notice […]

Serving gzipped assets from Rails application

One good practice for your assets is to gzip them and serve them compressed. To do this in your Rails app, you can make use of the Rack::Deflater middleware. Make sure that you use it in your middleware stack, before the middleware that does the handling of static assets. For example, if you’re using ActionDispatch::Static […]