Rails Asset Pipeline - Invalid Fingerprint

My Rails 4 application has new.html.erb which has a link to form.html.erb :

 # app/assets/templates/jobs/new.html.erb ... <ng-include src="'<%= asset_path("jobs/form.html") %>'"></ng-include> ... # app/assets/templates/jobs/form.html.erb my form is here 

( ng-include AngularJS directive)

The problem is that when changing form.html.erb production environment still loads the old form.html.erb . This probably happens because new.html.erb not been changed and therefore has the same old fingerprint that points to form.html.erb with the old fingerprint.

What is the Rails way to do this?

0
source share
1 answer

To answer this question, in any case, someone else has a problem, you need to run the following:

 rake assets:clean rake assets:precompile touch tmp/restart.txt 

After completing the rake task, you need to restart Rack, otherwise the new pre-compiled files for reference will not be downloaded.

+2
source

Source: https://habr.com/ru/post/956763/


All Articles