Rails 3.1 pipeline fingerprint for production JS files

I deploy the project to the server after deploying CSS and images - it works, but JS does not work - 404. JavaScript hash in HTML and public / assets are inconsistent.

In HTML: application-6851a5d9167871936c32da723dca0f23.js
In public/assets: application-95ecf5bab4b7984abe8c1c23b72a7679.js
+5
source share
2 answers

Did you run rake assets: clean assets: precompile ??

Also, if you use GIT, you will need 'git rm' older versions of assets. You will need to do something similar for other version control systems if you update the production environment by tapping the workspace (e.g. Heroku).

- , , ( ). - .

0

.

. :

touch tmp/restart.txt

Capistrano 3 deploy.rb:

namespace :deploy do
  desc 'Restart application'
  task :restart do
    on roles(:app) do
      within release_path do
        execute :touch, 'tmp/restart.txt'
      end
    end
  end

  after 'deploy:publishing', 'deploy:restart'
end
0

All Articles