Ruby-on-rails – “heroku run rake assets:clean” doesn’t clean anything

asset-pipelineherokuruby-on-rails

I execute

$ heroku run rake assets:clean
Running `rake assets:clean` attached to terminal... up, run.2
/usr/local/bin/ruby /app/vendor/bundle/ruby/1.9.1/bin/rake assets:clean:all RAILS_ENV=production RAILS_GROUPS=assets
rm -rf /app/public/assets

But it doesn't look like it is working due I can access to the assets by http request and also if I open a heroku console I can see the files:

$ heroku run console
irb(main):013:0> Dir.glob "./public/assets/*"
=> ["./public/assets/img", "./public/assets/application.js.gz", "./public/assets/application.js", "./public/assets/rails.png", "./public/assets/manifest.yml", "./public/assets/application.css", "./public/assets/assets", "./public/assets/application.css.gz"]

I need to remove the assets because they are producing conflicts with my new configuration.

Best Answer

The rake assets:clean functionality has been replaced with

rake assets:clobber

in the latest version of Rails.

https://github.com/rails/sprockets-rails/blob/master/README.md

Related Topic