Raj
Raj

Reputation: 22926

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?

Upvotes: 1

Views: 1012

Answers (2)

Jigar Bhatt
Jigar Bhatt

Reputation: 4650

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.

Upvotes: 0

Pierre-Louis Gottfrois
Pierre-Louis Gottfrois

Reputation: 17631

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.

Upvotes: 7

Related Questions