Questions tagged [asset-sync]

Synchronises Assets between Rails and S3.

Asset Sync is built to run with the new Rails Asset Pipeline feature introduced in Rails 3.1. After you run bundle exec rake assets:precompile your assets will be synchronised to your S3 bucket, optionally deleting unused files and only uploading the files it needs to.

This was initially built and is intended to work on Heroku but can work on any platform.

Github

34 questions
2
votes
2 answers

Heroku asset_sync gem not uploading to s3

My asset_sync gem does not upload to s3 when I precompile assets asset_sync.rb if defined?(AssetSync) AssetSync.configure do |config| config.fog_provider = 'AWS' config.aws_access_key_id = ENV['AWS_ACCESS_KEY_ID'] …
Passionate Engineer
  • 10,034
  • 26
  • 96
  • 168
2
votes
3 answers

Ckeditor- heroku broken after rails 4 upgrade

Can't seem to figure out why ckeditor no longer works on heroku. It works fine on my local machine. UPDATE: works without the asset_sync gem when assets are hosted on heroku - but does not work with it. Errors:Uncaught SyntaxError: Unexpected token…
user2515011
  • 127
  • 1
  • 12
1
vote
1 answer

Problems serving .js and .css assets cloudfront CDN Heroku Rails 4 App

I am trying to host the assets of my Rails 4 App over Cloudfront CDN. I used to use asset_sync and s3 but I wanted to switch over to a CDN. When I go to my Heroku App, I see that all the pages are just bare HTML. None of the JS or CSS is being…
1
vote
1 answer

How to get path to S3 assets from Rails controller

My setup I'm using Rails 3, asset_sync and paperclip. When I'm developing on my local machine, I want assets to be served through asset pipeline. In production, I want assets to be served from S3. My question How can I access to the asset path…
rap1ds
  • 629
  • 1
  • 5
  • 10
1
vote
0 answers

asset_sync not calling md5 hashed asset with Rails 3

I was wondering if anyone could see anything wrong with my asset_sync config, when uploading to my bucket the original and the md5-hash version are being uploaded, instead of just the hashed version, is this correct? Using: Manifest…
Richlewis
  • 15,070
  • 37
  • 122
  • 283
1
vote
3 answers

Rails Image assets in AngularJS Directive and template

I have Rails 4 Application with AngularJS using these gems: gem 'angularjs-rails' gem 'angular-rails-templates' gem 'asset_sync' It works great with a template like this:
channa ly
  • 9,479
  • 14
  • 53
  • 86
1
vote
1 answer

asset_sync not uploading to S3

I'm have trouble uploading my assets to S3 with asset_sync production.rb config.action_controller.asset_host = "//#{ENV['FOG_DIRECTORY']}.s3-eu-west-1.amazonaws.com" config.assets.digest = true config.assets.enabled =…
Nicolas Duval
  • 167
  • 1
  • 9
1
vote
1 answer

Set Expiry Headers asset_sync

I am using the asset_sync gem to upload my assets to an s3 bucket. When running yslow on my website i get a list of images that have no expiry header.Now i can set these manually but when you have a mass amount if images that could take a while.. Is…
Richlewis
  • 15,070
  • 37
  • 122
  • 283
0
votes
0 answers

Excon::Error::Socket: Too many open files - getaddrinfo (Errno::EMFILE) when deploying

I get this error right after precompiling the assets in the capistrano deploy script: Excon::Error::Socket: Too many open files - getaddrinfo (Errno::EMFILE) /home/deployer/au/shared/bundle/ruby/2.4.0/gems/excon-0.55.0/lib/excon/socket.rb:101:in…
Cristian
  • 5,877
  • 6
  • 46
  • 55
0
votes
1 answer

Rails asset pipeline flattens directories

I've been using asset_sync, to move our static assets to Amazon S3, and I've noticed that when I precompile my assets (using foreman run rake assets:precompile), the base directories get flattened. They go from: /app /assets/ /images …
Adam
  • 4,445
  • 1
  • 31
  • 49
0
votes
1 answer

Glyphicons are not showing when served from AWS

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,…
0
votes
1 answer

asset_sync not compiling assets to S3

I'm working with this tutorial and I'm up to the part that says to run bundle exec rake assets:precompile If you take a look at the website, you can see that she shows the output from this command and what it should look like. However, I don't get…
0
votes
1 answer

How to enable Amazon S3 CORS for web assets for bootstrap

I am using asset_sync gem for rails to host twitter bootstrap asset in Amazon S3. I seems to works fine even with a little warning on other browsers except Firefox. In Firefox it shows strange character instead of bootstrap font icon. The error…
channa ly
  • 9,479
  • 14
  • 53
  • 86
0
votes
1 answer

ckeditor rails gem adds base url to assets

I am using this CKEditor gem: with Rails 4 and assets_sync and Heroku I get the following url: http://www.baseurl.com//mybucket.s3.amazonaws.com/assets/ckeditor/config-77c214941cb7b15940a497f28f333f30.js while it should…
dpaluy
  • 3,537
  • 1
  • 28
  • 42
0
votes
1 answer

asset_sync digest URLs not working on production

I have been trying to figure out why my production config will still only display the "non digest" URLs. If I run RAILS_ENV=production rails s locally, the URL's work just fine. But as soon as I push to production, the URLs show up like this,…
Jonathan Reyes
  • 1,387
  • 1
  • 10
  • 23