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

Don't know how to build task 'assets:clean_expired' #88

Open runemadsen opened 10 years ago

runemadsen commented 10 years ago

Suddenly I'm getting this error when pushing to Heroku. This happened after bumping to gem version gem 'turbo-sprockets-rails3', '~> 0.3.11'. Using Rails version 3.2.13.

Any ideas of what could cause this?

Copied binary asset to glyphicons.png
Copied binary asset to glyphicons.svg
Copied binary asset to logo-white.svg
Copied binary asset to logo.svg
Generated non-digest assets in 623ms
Asset precompilation completed (457.15s)
Running: rake assets:clean_expired
rake aborted!
Don't know how to build task 'assets:clean_expired'
 (See full trace by running task with --trace)
-----> Discovering process types
Procfile declares types -> web
Default types for Ruby  -> console, rake, worker
pboling commented 10 years ago

Using Rails 3.2.18 with

gem 'turbo-sprockets-rails3', '~> 0.3.11'

I am having the same error.

nfriend21 commented 10 years ago

+1

gaugau commented 10 years ago

+1

RAILS_GROUP=assets rake -T | grep asset will list out that task. But deploying to heroku will raise the missing exception.

ndbroadbent commented 10 years ago

Please try updating to 0.3.14 and let me know if it's fixed

drewB commented 10 years ago

The error is is still there is 0.3.14

drewB commented 10 years ago

@runemadsen what version of the gem was working?

runemadsen commented 10 years ago

@drewB It happened when I bumped from 0.3.6 to 0.3.11.

drewB commented 10 years ago

Interesting. I still get the error on 0.3.6.

pboling commented 10 years ago

We've had the error on our deploys for at least a year, but not sure what versions.

ndbroadbent commented 10 years ago

Sorry I haven't been able to resolve this issue yet, would greatly appreciate a pull request if anyone can find a solution.

mockdeep commented 10 years ago

Just ran into this issue, too, when upgrading from 0.3.6 to 0.3.14.

mockdeep commented 10 years ago

Just downgraded back to 0.3.6 to double check and I'm still seeing the error. I never noticed it before, but that's not to say it wasn't there. However, I did upgrade a bunch of gems today, so it may have been caused by that. Upgraded from rails 3.2.15 to 3.2.19.

charlesdeb commented 10 years ago

Yep, same error here. Using rails 3.2.13, turbo-sprockets-rails3 (0.3.11). Even though I get the error, heroku still deploys a lot faster than without turbo-sprockets and it seems to deploy and launch fine.

supermomonga commented 10 years ago

Got same error when deploying heroku. below is the my env:

rake -T on heroku:

❯ heroku run 'rake -T' | grep assets:clean 
Running `bundle exec rake -T` on myapp as run.2693:
rake assets:clean                  # Remove compiled assets

rake -T on local machine:

❯ bundle exec rake -T | grep assets:clean
rake assets:clean                  # Remove compiled assets
rake assets:clean_expired          # Remove old assets that aren't referenced by manifest.yml
rrauenza commented 9 years ago

I also see this issue when running the target from within supervisord:

[program:clean_assets]
environment=RAILS_ENV="production"
command=/opt/rvm/bin/app_bundle exec rake assets:clean_expired                  
user=root                                                                       
autostart=true                                                                  
autorestart=false                                                               
startretries=0                                                                  
startsecs=0                                                                     
exitcodes=0                                                                     
directory=/opt/myapp                                              
stdout_logfile=/tmp/precompile_asserts.log                                      
redirect_stderr=true                
rrauenza commented 9 years ago

Aha!

Add require 'turbo-sprockets-rails3' to config/application.rb per a vaguely similar http://stackoverflow.com/questions/7205964/dont-know-how-to-build-task-assetsprecompile

forgotpw1 commented 8 years ago

I was able to resolve the heroku deploy error on rails 3.2.17 and turbo-sprockets-rails3 I had to set config.assets.handle_expired to true in the config/environments/production.rb file and add the config variable RAILS_GROUPS=assets to the heroku environment