diff --git a/lib/bootstrap-sass/engine.rb b/lib/bootstrap-sass/engine.rb index fe5c4a6ecd..d288080e8a 100644 --- a/lib/bootstrap-sass/engine.rb +++ b/lib/bootstrap-sass/engine.rb @@ -5,7 +5,12 @@ class Engine < ::Rails::Engine %w(stylesheets javascripts fonts images).each do |sub| app.config.assets.paths << root.join('assets', sub).to_s end - app.config.assets.precompile << %r(bootstrap/glyphicons-halflings-regular\.(?:eot|svg|ttf|woff2?)$) + + # sprockets-rails 3 tracks down the calls to `font_path` and `image_path` + # and automatically precompiles the referenced assets. + unless Sprockets::Rails::VERSION.starts_with?('3') + app.config.assets.precompile << %r(bootstrap/glyphicons-halflings-regular\.(?:eot|svg|ttf|woff2?)$) + end end end end