I have browsed around but unable to find why rvmsudo is needed for passenger installation.
I am installing passenger with nginx in my server and I'm using RVM. According to the passenger user manual I need to use rvmsudo
to install passenger if I have rvm installed.
Whats the difference between using rvmsudo
and without using rvmsudo
. Is using rvmsudo to system wide install needed despite having rvm installed locally only ? (just use gem install passenger
)
Thank You !
sudo
grants a command root permissions to the current user to carry a certain activity (given the user is allowed to usesudo
). That said, on installing passenger you need root permission to install files at required locations.One simple thing to do that comes to mind instantly is:
This won't work! Here's the explanation:
Therefore you are required to use the solution provided by RVM i.e.
rvmsudo
. It will pass on any environment variables that RVM set up to get you to the correct Ruby along with sudo privileges, which is exactly what you need to install passenger in this example.