I have a Rails project, hosted on Heroku, and I just moved hosting my assets to S3. This has all gone smooth EXCEPT for some custom fonts (SVG fonts from icomoon). They're not working, and when I view my web source, I can see that my S3 bucket doesn't show up:
@font-face{font-family:'Starter-Icons';src:url(https://.s3.amazonaws.com/fonts/Starter-Icons.eot);src:url(https://.s3.amazonaws.com/fonts/Starter-Icons.eot?#iefix)
etc. However, other assets (images, stylesheets, etc) hosted with S3 do include the proper bucket name.
My font-face
declarations are in a .less file (this doesn't need to be a .less.erb file does it?)
@font-face {
font-family: 'Starter-Icons';
src:font-url("Starter-Icons.eot");
src:font-url("Starter-Icons.eot?#iefix") format('embedded-opentype'),
font-url("Starter-Icons.woff") format('woff'),
font-url("Starter-Icons.ttf") format('truetype'),
font-url("Starter-Icons.svg#Starter-Icons") format('svg');
font-weight: normal;
font-style: normal;
}
All my fonts are in /app/assets/fonts
. I've followed the steps in the accepted answer here, but the fact that my bucket name isn't showing up for the fonts leads me to believe it's a different issue.
EDIT
I am using the asset_sync gem for this, its config is below:
if defined?(AssetSync)
AssetSync.configure do |config|
config.fog_provider = 'AWS'
config.fog_directory = 'starterapp'
config.aws_access_key_id = ENV['STARTER_AWS_ACCESS_KEY_ID']
config.aws_secret_access_key = ENV['STARTER_AWS_SECRET_ACCESS_KEY']
# Don't delete files from the store
config.existing_remote_files = 'keep'
# Automatically replace files with their equivalent gzip compressed version
config.gzip_compression = true
end
end