I am trying to set up automatic deployment for my Rails app using Capistrano. Capistrano will need to run sudo kill
, and I achieved that without it asking me for a password, by editing the /etc/sudoers
file (via visudo
, of course), and added the following line:
%deployers ALL= NOPASSWD: /bin/kill
However, since I am using RVM single-user setup, the bundle
executable is at /home/peddiemarketdeploy/.rvm/gems/ruby-1.9.3-p194/bin/bundle
, so, similarly, I added
%deployers ALL= NOPASSWD: /home/peddiemarketdeploy/.rvm/gems/*
in that file as well, and tried to run sudo bundle
, but sudo still asks me for a password. Since RVM uses version number in the name of directories, I do not want to hardcode a path into /etc/sudoers
. Any ideas how I can edit my sudoers file to make it work?
Thanks!