In Gemfile add:
In config/environments/production.rb add
config.assets.compile = false #To stop run time assets precompile in production. config.assets.digest = true #To access assets which are precompiled and in their names have appendend digets by rails config.cache_classes = true #allowing caching assets
In config/application.rb add
Bundler.require(:default, :assets, Rails.env)
Also add these lines
# Enable the asset pipeline config.assets.enabled = true # Version of your assets, change this if you want to expire all your assets config.assets.version = '1.0'