Failed to decode downloaded font - Rails

I am working with a template that serves font icons (font-awesome and simple line-icons) through bower via vendor/assets/bower_components

Recently, they stopped working in production, and I received a console error message:

Failed to decode downloaded font

And this works when the page loads:

301 - files were constantly moved

I cannot understand why, since I did not touch them, they were configured by default thanks to the template.

The file structure in bower components looks like this:

 --fontawesome --css --font-awesome.css --font-awesome.css.map --font-awesome.min.css --fonts --fontawesome-webfont.eot --fontawesome-webfont.svg --fontawesome-webfont.ttf --fontawesome-webfont.woff --fontawesome-webfont.woff2 

The font-awesome.css file above contains:

 @font-face { font-family: 'FontAwesome'; src: url('../fonts/fontawesome-webfont.eot?v=4.3.0'); src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.3.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.3.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.3.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.3.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular') format('svg'); font-weight: normal; font-style: normal; } 

The requirement in the base.css.scss file looks so that you can see the reference path. This base.css.scss file base.css.scss required in the application.css.scss file.

 /* * This is a manifest file that'll be compiled into base.css, which will include all the files * listed below. * * --- FontAwesome *= require fontawesome/css/font-awesome.min * --- Simple Line Icons *= require simple-line-icons/css/simple-line-icons * --- Animate.css *= require animate.css/animate.min * --- Whirl (spinners) *= require whirl/dist/whirl * */ 

The application.rb file includes:

 config.assets.paths << Rails.root.join('vendor', 'assets', 'bower_components') 

They work normally locally, but are not produced (Heroku).

In addition, I have this setting in the gem file:

 group :production do gem 'pg' gem 'rails_12factor' end 

If you require anything else, let me know. Any help would be great.

+6
source share

All Articles