passenger-config restart-app with capistrano

I’m sure not only me having this issue after update capistrano with passenger v.5

Basically problem it looking like that:

INFO [c55a19d7] Running /usr/local/rvm/bin/rvm default do passenger-config restart-app /home/model/staging --ignore-app-not-running as model@instamango.com
DEBUG [c55a19d7] Command: /usr/local/rvm/bin/rvm default do passenger-config restart-app /home/model/staging --ignore-app-not-running
DEBUG [c55a19d7]    *** ERROR: You are not authorized to query the status for this Phusion Passenger instance. Please try again with 'rvmsudo'.

This case is working for rvm system wide

Just add:

set :rvm_map_bins, fetch(:rvm_map_bins, []).push('rvmsudo')
set :passenger_restart_command, 'rvmsudo passenger-config restart-app'

to deploy.rb

And to not prompt the user password with sudo, just create file /etc/sudoers.d/deployer_username with content:

deployer_username ALL=(ALL) NOPASSWD:ALL

That’s all

 
19
Kudos
 
19
Kudos

Now read this

How to add swap to an EC2 instance

Swap should take place on the Instance Storage (ephemeral) disk and not an EBS device. Swapping will cause a lot of IO and will increase cost on EBS. EBS is also slower than the Instance Store and the Instance Store comes free with the... Continue →