-1

Self taught aspiring rails dev here. I learned the hard way I needed to run rake db:clean rake db:clobber rake db:environment rake db:precompile

before running git heroku push master. All answers found online presupposed knowledge. Would greatly appreciate an explanation of why this is necessary and what is going on with respect to Rails, as well as on a technical, more general level.

1 Answers1

0

Rails documentation is the best source to learn about this. See here, http://guides.rubyonrails.org/asset_pipeline.html

I will sum up, basically running precompile assets, compress all the files into one file. Moreover, as quoted in docs, one of the important reason is to reduce the number of requests that a browser makes to render a web page.

run rake db:clean rake db:clobber are not necessary everytime. Moreover, as far as I know there is no such task as rake db:clobber or rake db:clean. There are tasks like rake assets:clobber and rake assets:clean.

Source: Difference between rake assets:precompile and rake assets:clobber

rake assets:clobber removes all compiled assets rake assets:clean removes old compiled assets.

Community
  • 1
  • 1
rank
  • 83
  • 7