Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make Nginx be aware of Rails code changes

If I serve my application using 'Rails s' whenever the code of the application changes the served app changes too. Now I am using Nginx and passenger, how do I replicate this behaviour, at least on the development environment?

like image 734
Nerian Avatar asked Dec 02 '25 05:12

Nerian


1 Answers

You actually want to reload Passenger, not nginx. Create a tmp/restart.txt file under your Rails app root directory. To reload, touch tmp/restart.txt. Passenger will notice the file change and reload.

like image 157
Jeff Avatar answered Dec 03 '25 19:12

Jeff



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!