I just upgraded to Rails 3.1 and the Asset Pipeline and I can't figure out why my font-face is not being read in anymore. I've tried the answers in this post (with no luck): Using @font-face with Rails 3.1 app?
Currently, I'm trying the selected solution. I have a fonts folder under app/assets. The file name is correct and exists in the fonts directory.
In my Application.rb
config.assets.paths << "#{Rails.root}/app/assets/fonts"
I've also tried, from the Rails Guide (http://guides.rubyonrails.org/asset_pipeline.html):
config.assets.paths << Rails.root.join("app", "assets", "fonts")
With this code, the path maps to this when the code is run
src: url('/assets/League_Gothic-webfont.eot
In my CSS:
@font-face {
font-family: "League_Gothic";
src: url('<%= asset_path('League_Gothic-webfont.eot') %>');
font-weight: normal;
font-style: normal;
}
When I try the other solution, essentially hard coding the path:
src: url(/assets/fonts/League_Gothic-webfont.eot);
I get this error when I click on the link in the source code of the page:
No route matches [GET] "/assets/fonts/League_Gothic-webfont.eot"