Search code examples
ruby-on-railsnginxamazon-ec2ruby-on-rails-5production-environment

Rails-code changed on production server, but no changes on browser


I have added some code and pushed it on my git account and also take pull it on server, and also run command rake assets:precompile RAILS_ENV=production and restarted nginx server many times. While editing the code using nano command on server, it shows updated.


Solution

  • if you use rails + nginx + passenger, you can enter the server rails app root and use touch tmp/restart.txt to restart the rails app. so changes on browser.

    reference: https://www.phusionpassenger.com/library/admin/apache/restart_app.html#restart-txt