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
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


Now read this

How to install via rbenv ruby with railsexpress patch

First file is version description: 2.1.5 build_package_patch_ruby_railsexpress() { fetch_git rvm-patchsets git:// master for p in rvm-patchsets/patches/ruby/2.1.5/railsexpress/* ; do patch -p1 < $p... Continue →