You have to add the folder to the assets path (to file config/application.rb
), see Rails Guides
config.assets.paths << "#{Rails.root}/app/assets/fonts"
And you should use the asset_path
helper:
src: url('<%= asset_path('Chunkfive-webfont.eot') %>');
More Related Contents:
- Amazon S3 CORS (Cross-Origin Resource Sharing) and Firefox cross-domain font loading
- How to create color shades using CSS variables similar to darken() of Sass?
- Why is @font-face throwing a 404 error on woff files?
- Why should we include ttf, eot, woff, svg,… in a font-face
- SASS: randomly pick background-image from a list
- Is there a SASS.js? Something like LESS.js?
- CSS @font-face absolute URL from external domain: fonts not loading in firefox
- Dynamic Sass Variables
- Ampersand (&) at the end, and part of, a selector in SASS
- How can one import only variables and mixins from Sass stylesheets?
- Have a variable in images path in Sass?
- Next.js Global CSS cannot be imported from files other than your Custom
- Multiple font-weights, one @font-face query
- How to compile or convert sass / scss to css with node-sass (no Ruby)?
- CSS-Only Sticky Table Headers In Chrome
- Fallback fonts on special characters
- SCSS extend a nested selector and override the nested rulesets
- Sass @each with multiple variables
- SASS indented syntax on multiple lines?
- Placeholder Mixin SCSS/CSS
- Internet Explorer @font-face is failing
- On IE CSS font-face works only when navigating through inner links
- Why put in front of the file name “_” or “_” in scss/css?
- Merging selectors from mixins
- how to change bootstrap version 4 button color
- Text Stroke (-webkit-text-stroke) css Problem
- SASS for loop updating hsla lightness returns error $lightness: “96.77419” is not a number for `hsla’
- How to properly introduce a light/dark mode in Bootstrap?
- how to watch changes in whole directory/folder containing many sass files
- SASS CSS: Target Parent Class from Child