Reputation: 18961
Trying to serve fonts from a deployed Rails 3.2 app that works in development. Example url:
http://app.code-london.co.uk/assets/146726/F3360BA8197ED501A.css
(located in app/assets/fonts/146726/
)
Results in 404.
I recently added:
Application.rb:
config.assets.paths << Rails.root.join("app", "assets", "fonts")
Production.rb:
config.serve_static_assets = true
FWIW the location does not have to be /assets, but what is needed to get heroku serving those font files?
This is a requirement by the typography.com set up (http://www.typography.com/cloud/user-guide/moving-to-production)
Edit I have just found out that the .eot files are being served, its just the .css files that are not. Suggests something in the asset pipeline that I don't know about?
Upvotes: 0
Views: 715
Reputation: 18961
The trick was to add a fonts directory to the {app}/public
folder.
The css files are now served as is (http://{site}/fonts/{folder}
), and the font foundry is a happy bunny. (/public
is not in browser path)
Upvotes: 2