I installed the bootstrap theme and everything works fine locally. However, when I went to click on the hero, my application could not find the fonts. I precompiled the assets and clicked on the hero, but no badges.
So, I created my development environment, such as heroku, with the following in development.rb:
config.assets.debug = true # Disable Rails static asset server (Apache or nginx will already do this). config.serve_static_assets = true # Compress JavaScripts and CSS. config.assets.js_compressor = :uglifier # config.assets.css_compressor = :sass # Do not fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false # Generate digests for assets URLs. config.assets.digest = true
now, my dev environment cannot find font files. Font files are located in two places:
app/assets/fonts/fontawesome-webfont.* public/assets/fontawesome-webfont.*
however, I get this error:
ActionController::RoutingError (No route matches [GET] "/assets/fontawesome-webfont.svg"):
here, how they are loaded from a precompiled css file (application-xxxxxxxxx.css):
@font-face { font-family: 'FontAwesome'; src: url('fontawesome-webfont.eot?v=4.0.3'); src: url('fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'), url('fontawesome-webfont.woff?v=4.0.3') format('woff'), url('fontawesome-webfont.ttf?v=4.0.3') format('truetype'), url('fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg'); font-weight: normal; font-style: normal; }
what am I doing wrong?
source share