ndbroadbent / turbo-sprockets-rails3

Speeds up your Rails 3 assets:precompile by only recompiling changed files, and only compiling once to generate all assets
MIT License
975 stars 78 forks source link

0.3.4 is not effective on capistrano deploy #39

Closed versum closed 11 years ago

versum commented 11 years ago

When using 0.3.4 with gem "capistrano", :github => "ndbroadbent/capistrano", :branch => "assets_rollback_and_expiry" precompilation is done from scratch on every deploy.

Capistrano is not throwing any errors is just that precompilation step is taking a long time (just as if turbo-sprockets were not present).

When I put gem 'turbo-sprockets-rails3', '0.3.2' in gemfile, deployment works as expected, precompilation is significantly faster.

Unfortunately I currently do not have time to investigate so I cannot propose a solution.

ndbroadbent commented 11 years ago

Hi there, my capistrano pull request has actually been merged into capistrano. Please try capistrano 2.13.5 and let me know if you are still experiencing any problems.

Please also try running time rake assets:precompile twice on your local machine, and let me know if both runs take the same amount of time.

versum commented 11 years ago

Capistrano 2.13.5 on rubygems does not have your asset recipe. It is merged on master but to use it I had to add to gemfile: gem 'capistrano', :github => 'capistrano/capistrano', :branch => 'master'

Anyway it still breaks if I use turbo-sprockets-rails3 0.3.4. On local machine asset precompilation works as expected in 0.3.4. When I deploy it to server using current capistrano master it has no effect on precompilation time.

Precompilation on deployment works if I switch to turbo-sprockets-rails3 0.3.2.

I tried deleting whole app directory from server and starting from scratch, it has no effect.

ndbroadbent commented 11 years ago

Sorry I haven't got back to you about this. Could you please try adding the following to config/environments/production.rb:

config.log_level = :debug
config.logger = Logger.new(STDOUT)

... and then deploying. You should see lots more info in the logs, so please let me know if you see anything strange.

Thanks!

versum commented 11 years ago

There is nothing unusual in the log. Just "Updating mtimes for current assets..." and then precompilation takes just as long as it would without turbo-sprockets. Manifest files are identical to those generated by 0.3.2, the command (rake assets:precompile) is the same yet something is wrong.

ndbroadbent commented 11 years ago

Hi there,

Please try version 0.3.5, it should now be a lot faster.

Thanks! Nathan

On Thu, Jan 3, 2013 at 12:50 AM, kantyka notifications@github.com wrote:

There is nothing unusual in the log. Just "Updating mtimes for current assets..." and then precompilation takes just as long as it would without turbo-sprockets. Manifest files are identical to those generated by 0.3.2, the command (rake assets:precompile) is the same yet something is wrong.

— Reply to this email directly or view it on GitHubhttps://github.com/ndbroadbent/turbo-sprockets-rails3/issues/39#issuecomment-11805850.

versum commented 11 years ago

Hi,

My totally unscientific tests show 0.3.5 to be roughly the same as 0.3.2 in terms of assets compilation time. Thank you for taking the time to address this issue, I'm closing it.