Reputation: 11
Using the asset_sync gem, I have precompiled and synced my local assets into Amazon's s3. This includes bootstrap.min.css and the various glyphicon webfonts.
When the assets are hosted locally, the glyphicons appear fine, but when hosted from s3, chrome and firefox do not recognize them (safari sees them fine).
Checking with Chrome's developer tools. I see that the glyphicons are being loaded with a 200 status and that the precompiled all.css is correctly pointing to where the fonts are located in s3.
I ran across some posts that suggested updating some of the related gems but I have newer gems than others that had (somewhat) similar problems. These gems are listed below:
sass-rails (5.0.4)
sass (3.4.19)
bootstrap-sass (3.3.5.1)
sprockets (2.12.4)
Upvotes: 0
Views: 552
Reputation: 11
According to AWS's own documentation, you need to enable Cross-Origin Resource Sharing (CORS) on S3. To do so, log into your account for AWS, right-click the bucket you want to enable, choose 'Permissions', and edit the cors.xml file given to allow for CORS.
source:
http://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html
Upvotes: 1