I have a Rails app served via Phusion Passenger and Nginx. I made some changes to both the server and the client side code, recompiled the production assets with bundle exec rake assets:precompile RAILS_ENV=production
, and attempted to restart both nginx and phusion with the following:
# stop then restart nginx
sudo kill $(cat /opt/nginx/logs/nginx.pid)
sudo /opt/nginx/sbin/nginx
# restart passenger
passenger-config restart-app
However, when I clear my browser cache and rerequest my host address, I see phusion and nginx are still serving the old JavaScript assets, rather than the JS assets I just compiled.
How can I stop then restart the rails server and serve the updated server and client side code? Any help others can offer on this question would be greatly appreciated.