The issue was caused by font files not properly loaded. If you are using css
file to declare your font class, you need to follow the steps below:
In your
aplication.rb
file add the following line:config.assets.paths << Rails.root.join('app', 'vendor','assets', 'fonts')
In the above case, the font files are in
app/vendor/assets/fonts
folder.When declaring the font class use
assets
+font name
reference in the URL like this:@font-face { font-family: 'fontello'; src: url('/assets/fontello.eot'); src: url('/assets/fontello.eot?#iefix') format('embedded-opentype'), url('/assets/fontello.woff') format('woff'), url('/assets/fontello.ttf') format('truetype'), url('/assets/fontello.svg#icons') format('svg'); font-weight: normal; font-style: normal; }
In my case I needed to additionally
require
thecss
file holding font class declaration. In myapplication.css
file, I have added the line below:*= require shared/fonts.css
Note: In my case the
font.css
file is in/vendor/assets/stylesheets/shared/
folder.