Capistrano + NGINX Passenger Restart Rails App

I finally got capistrano to work on my website, however I canโ€™t get to restart part of the application to work. What I want todo is setting up capistrano to restart the mongreon clan, which launches the rails application after the deployment has passed. Since I used the passenger to install everything, I donโ€™t know how to restart the cluster of mongrels.

Does anyone know how to do this? Every tutorial that I read, it mentions that there must be a restart.txt file in the / tmp folder of the application, however I cannot find anything that explains how to restart it ... or what to add to the file.

+6
git ruby-on-rails nginx deployment capistrano
source share
1 answer

I think adding this task to deploy.rb should be done

  namespace: deploy do
   task: restart do
     run "touch # {current_path} /tmp/restart.txt"
   end
 end

Basically this will run touch tmp/restart.txt in the rails root directory, which the passenger will restart

+9
source share

All Articles