amazon s3 - SVG Fonts with Rails Asset Pipeline and S3 Hosting -


i have rails project, hosted on heroku, , moved hosting assets s3. has gone smooth except custom fonts (svg fonts icomoon). they're not working, , when view web source, can see 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 s3 include proper bucket name.

my font-face declarations in .less file (this doesn't need .less.erb file 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 fonts in /app/assets/fonts. i've followed steps in the accepted answer here, fact bucket name isn't showing fonts leads me believe it's different issue.

edit

i using asset_sync gem this, config below:

if defined?(assetsync)   assetsync.configure |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 store   config.existing_remote_files = 'keep'    # automatically replace files equivalent gzip compressed version   config.gzip_compression = true end 

end

well, (un)fortunately -- works now, , did bundle exec rake assets:precompile (again) , push heroku (again). bundle exec rake assets:precompile cleared out old compiled css/js/font files, , built new ones. did step , didn't these results, i'm not sure how it's working.

this could've been user error--i don't see how made work. confusing thing running

irb(main):001:0> rails.application.config.assets.paths 

returns

=> ["/app/app/assets/fonts", "/app/app/assets/images", "/app/app/assets/javascripts", "/app/app/assets/stylesheets" 

and i'm not sure how /app/app/assets getting created on production vs /app/assets/ on development, but, works.


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -