{"action":"created","issue":{"url":"https://api.github.com/repos/rumblelabs/asset_sync/issues/304","labels_url":"https://api.github.com/repos/rumblelabs/asset_sync/issues/304/labels{/name}","comments_url":"https://api.github.com/repos/rumblelabs/asset_sync/issues/304/comments","events_url":"https://api.github.com/repos/rumblelabs/asset_sync/issues/304/events","html_url":"https://github.com/rumblelabs/asset_sync/issues/304","id":70651403,"number":304,"title":"Sprockets 3 doesn't provide gz file anymore (gzip compression)","user":{"login":"charlesdg","id":495232,"avatar_url":"https://avatars.githubusercontent.com/u/495232?v=3","gravatar_id":"","url":"https://api.github.com/users/charlesdg","html_url":"https://github.com/charlesdg","followers_url":"https://api.github.com/users/charlesdg/followers","following_url":"https://api.github.com/users/charlesdg/following{/other_user}","gists_url":"https://api.github.com/users/charlesdg/gists{/gist_id}","starred_url":"https://api.github.com/users/charlesdg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charlesdg/subscriptions","organizations_url":"https://api.github.com/users/charlesdg/orgs","repos_url":"https://api.github.com/users/charlesdg/repos","events_url":"https://api.github.com/users/charlesdg/events{/privacy}","received_events_url":"https://api.github.com/users/charlesdg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-24T10:26:56Z","updated_at":"2015-05-10T12:18:33Z","closed_at":null,"body":"As mentioned in Sprockets 3 commit (https://github.com/sstephenson/sprockets/commit/d388ef7cc0e36e710539fb11799d7e5518609d61), Sprockets 3 doesn't provide gzip file anymore.\r\n\r\nThen, if gzip compression is activated for asset sync, the  `upload_file` method of the file `storage.rb` (https://github.com/rumblelabs/asset_sync/blob/master/lib/asset_sync/storage.rb) will not do its job anymore since the gz file are not compiled by Sprockets 3.\r\n\r\nFor now, I came back to `sprockets 2.12.3` and everything goes fine.\r\n"},"comment":{"url":"https://api.github.com/repos/rumblelabs/asset_sync/issues/comments/100632953","html_url":"https://github.com/rumblelabs/asset_sync/issues/304#issuecomment-100632953","issue_url":"https://api.github.com/repos/rumblelabs/asset_sync/issues/304","id":100632953,"user":{"login":"mirzali","id":4478104,"avatar_url":"https://avatars.githubusercontent.com/u/4478104?v=3","gravatar_id":"","url":"https://api.github.com/users/mirzali","html_url":"https://github.com/mirzali","followers_url":"https://api.github.com/users/mirzali/followers","following_url":"https://api.github.com/users/mirzali/following{/other_user}","gists_url":"https://api.github.com/users/mirzali/gists{/gist_id}","starred_url":"https://api.github.com/users/mirzali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mirzali/subscriptions","organizations_url":"https://api.github.com/users/mirzali/orgs","repos_url":"https://api.github.com/users/mirzali/repos","events_url":"https://api.github.com/users/mirzali/events{/privacy}","received_events_url":"https://api.github.com/users/mirzali/received_events","type":"User","site_admin":false},"created_at":"2015-05-10T12:18:33Z","updated_at":"2015-05-10T12:18:33Z","body":"as a temporary patch, you can gzip the assets manually:\r\n\r\nin config/initializers/asset_sync.rb\r\n```ruby\r\nconfig.run_on_precompile = false\r\n```\r\nand then have a rake task named \"assets:deploy\"\r\n```ruby\r\nnamespace :assets do\r\n\r\n  task 'deploy' => [:environment] do\r\n    %x{\r\n      RAILS_ENV=production UPLOAD_ASSETS=true RAILS_GROUPS=assets bundle exec rake assets:clobber assets:precompile assets:gzip assets:sync\r\n    }\r\n  end\r\n\r\n  task 'gzip' => [:environment] do\r\n    require 'zlib'\r\n\r\n    Dir['public/assets/**/*.{js,css}'].each do |path|\r\n\r\n      Zlib::GzipWriter.open(\"#{path}.gz\") do |gz|\r\n        gz.mtime = File.mtime(path)\r\n        gz.orig_name = path\r\n        gz.write(IO.binread(path))\r\n      end\r\n\r\n    end\r\n\r\n  end\r\n\r\nend\r\n\r\n```\r\nwarning: you may need to clear the remote folder, because the gem will see the files as already uploaded and ignore them"}}