title: Rails 4 with asset_sync
body: <p>Has anyone got the asset_sync gem to work with Rails 4? I have never had a problem with it with Rails 3, but i cannot precompile my assets to my S3 bucket anymore, what happens is everything is just compiled into my public folder.</p>
  
  <p>Could anyone offer advice on resources to look at or summarise the key differences between Rails 3 and 4 that would cause this to fail. Some examples of configuration used would be helpful from those who have got it working. I am at a loss on how to start debugging this</p>
  
  <p>Any advice and help appreciated</p>
  
  <p>Thanks</p>
  
  <p>EDIT</p>
  
  <p>Current config</p>
  
  <p><b>asset_sync.rb</b> # Within Initializer</p>
  
  <pre><code>if defined?(AssetSync)
   AssetSync.configure do |config|
    config.fog_provider = ENV['FOG_PROVIDER']
    config.aws_access_key_id = ENV['AWS_ACCESS_KEY_ID']
    config.aws_secret_access_key = ENV['AWS_SECRET_ACCESS_KEY']
    config.fog_directory = ENV['FOG_DIRECTORY']
    config.fog_region = ENV['FOG_REGION']
    config.existing_remote_files = "delete"
    config.gzip_compression = true
    config.manifest = true
    config.custom_headers = { '.*' =&gt; { cache_control: 'max-age=315576000', expires: 1.year.from_now.httpdate } }
   end
  end
  </code></pre>
  
  <p>Production.rb</p>
  
  <pre><code>YmcaView::Application.configure do
  
  config.action_controller.asset_host = "//#{ENV['FOG_DIRECTORY']}.s3.amazonaws.com"
  config.cache_classes = true
  config.eager_load = true
  config.consider_all_requests_local       = false
  config.action_controller.perform_caching = true
  config.serve_static_assets = true 
  config.assets.js_compressor = :uglifier
  config.assets.compile = true
  config.assets.digest = true
  config.assets.version = '1.0'
  config.log_level = :info
  config.i18n.fallbacks = true
  config.active_support.deprecation = :notify
  config.log_formatter = ::Logger::Formatter.new
  end
  </code></pre>
  
  <p>Output when running rake assets:precompile RAILS_ENV=production</p>
  
  <pre><code> I, [2014-03-04T13:04:41.176230 #6085]  INFO -- : Writing /home/richardlewis/Rails/ymca_view/public/assets/760x380_10-477c3cdc939905d6b32f9997e7f93072.jpg
   I, [2014-03-04T13:04:41.177963 #6085]  INFO -- : Writing /home/richardlewis/Rails/ymca_view/public/assets/aboutus-d9ad504fcd86071255015d24780caef8.jpg
   I, [2014-03-04T13:04:45.018794 #6085]  INFO -- : Writing /home/richardlewis/Rails/ymca_view/public/assets/application-90d317f561a8b0e84124ce7bb872f867.js
   I, [2014-03-04T13:04:46.666640 #6085]  INFO -- : Writing /home/richardlewis/Rails/ymca_view/public/assets/application-b422f803b56ae2f5c56a648891ec553e.css
   [fog][WARNING] Unable to load the 'unf' gem. Your AWS strings may not be properly encoded.
  </code></pre>