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
976 stars 78 forks source link

this some kind of joke? #92

Open ghost opened 10 years ago

ghost commented 10 years ago

When I run cap deploy

RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile

takes ~17 minutes.

Per your README I added

group :assets do
  gem 'turbo-sprockets-rails3'
end

to my Gemfile and ran bundle install.

When I cap deploy again there is no speed up, it still right at ~17 minutes.

Doesn't seem to do anything as far as I can tell.

Also, rake assets:clean_expired doesn't exist.

Thanks for wasting an hour of my time.

ndbroadbent commented 10 years ago

Try running cap deploy again, it should be faster on the second run after adding the gem. The first run creates an additional source manifest file that is required for the speed up.

On Sun, Apr 27, 2014 at 12:13 PM, Greg Donald notifications@github.comwrote:

When I run cap deploy, RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile takes ~17 minutes.

I added

group :assets do gem 'turbo-sprockets-rails3' end

to my Gemfile and ran bundle install.

When I cap deploy again there is no speed up, it still right at ~17 minutes.

Doesn't seem to do anything as far as I can tell.

Also, rake assets:clean_expired doesn't exist.

Thanks for wasting an hour of my time.

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

ghost commented 10 years ago

Seems you missed the part of my bug report where I said "When I cap deploy again".

Also, public/assets/sources_manifest.yml never gets created.

ndbroadbent commented 10 years ago

Alright, well, no this is isn't a joke, this is a bug

On Sun, Apr 27, 2014 at 12:17 PM, Greg Donald notifications@github.comwrote:

Seem you missed the part of my bug report where I said "When I cap deploy again".

Also, public/assets/sources_manifest.yml never gets created.

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

lulalala commented 10 years ago

@gdonald This gem works for most people, so please post more information about your Rails version/ gem version etc. A less provocative title would be even better in getting help.

Try running rake compile in development machine/mode and see if there is a difference.

Do you have lots of @import instead of require?

ksudheer commented 9 years ago

group :assets do gem 'turbo-sprockets-rails3' end

How come you are using only tourbo gem? is should be along with asset_sync right?

group :assets do gem 'sass-rails', '~> 3.2.3' gem 'coffee-rails', '~> 3.2.1' gem 'uglifier', '>= 1.0.3' gem "asset_sync", '1.0.0' gem 'turbo-sprockets-rails3' end

you need to have asset_sync configured i think

streetlogics commented 9 years ago

+1 having this same issue as well. I'm using Capistrano 3. I can confirm that the sources_manifest.yml file does get created, but apparently is ignored all together during deployment. I guess where I'm confused is in the readme it says:

Issue with Capistrano 2: Since the default behavior of Capistrano consists of creating "releases" every time a deploy occurs, one strategy might be to create a "shared assets" folder. You could create a symlink to the shared assets folder, every time you deploy.

However, my Capistrano 3 release process still creates release folders every time a deploy occurs, so it seems as though the shared assets folder is still necessary. I tried running `load "deploy/assets"', but got an error that was undefined. I manually created a task that gets executed before precompile to create the assets folder and symlink:

execute "mkdir #{shared_path}/assets -p &&  ln -s #{shared_path}/assets #{release_path}/public/assets"

After I added this line to my deployment process (before precompile), my 2nd precompile went from >= 200 seconds to <= 50 seconds.

peromax commented 9 years ago

+1 Same issue. It seems sources_manifest.yml always created in the release folder after assets:precompile.

peromax commented 9 years ago

@streetlogics thanks. Your solution works.