简体   繁体   中英

Rails - Do we need to restart server everytime a change is made?

I am running a Rails app (with Passenger in Apache) in production mode. When I make changes to a erb file and refresh the site in browser, changes are not reflected. I need to restart the server to see the change reflected. This is annoying.

What is the right way to make changes deploy automatically?

You should not be using the production mode as a "development" mode. If you are making changes regularly, you should test on development mode and then if no bugs are found, you should push your code to your production environment.

Yes, In the production mode without restart your server, your changes not reflect.

I faced similar issue and i resolved it by following way.

  1. My website is used by Americans only, so i push the code at midnight of US timezone.
  2. Before i restart, i checked there how many users are loggedin now? If no users found then i restart my server.

Above technique helped me a lot.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM