font_assets
font_assets copied to clipboard
Error when recompiling asset
When rails precompile the assets RAILS_ENV=production bundle exec rake assets:precompile
I got this error No such middleware to insert before: "ActionDispatch::Static"
Any idea how to resolve this?
Rails 4.2.2
+1 rails 4.0.13
+1 Seeing the same behavior here on Rails 4.2.1.
+1 4.2.4
This gem only works if you are NOT precompiling your assets in production, because it requires asset requests to go through the Rails app, and if you precompile your assets then you are most likely serving them through a web server like NGINX. If this is the case, don't use this gem but instead look into configuring the CORS headers for font requests. For example, here is a way to do that in NGINX.