Activities

March 2011
M T W T F S S
« Feb   Apr »
 123456
78910111213
14151617181920
21222324252627
28293031  

Re-deploying Rails application on Passenger (restarting rails)

Deploying a new version of a Ruby on Rails application is as simple as re-uploading the application files, and restarting the application after the Phusion passenger arrival. But I do not wish to restart web server frequently for rails re-deployment since there are many other sites running.

There are two ways to make it

1. By restarting Apache. ( I do not like this way šŸ™ )

2. By creating or modifying the file tmp/restart.txt in the Rails applicationā€™s root folder. Phusion Passenger will automatically restart the application during the next request.

Suppose I have an application named “myrailsapps” and I want to restart the rails deployment once afterI had changed the database details in “database.yml” file. But still it’s showing old database connectivity. I have only ftp access to the server. So I created an empty txt file named “restart.txt” and uploaded it to “myrailsapps/tmp“. Pls note that you have to delete this file if it already there.

Please note that, unlike earlier versions of Phusion Passenger, restart.txt is not automatically deleted. Phusion Passenger checks whether the timestamp of this file has changed in order to determine whether the application should be restarted.

Now I can see new settings were effected. !!!!!

Check this url to how configure passenger

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>