I have set up a rails production environment with:
* The rails apps under a user called deploy.
* The deploy user is just a regular user NOT having sudo permissions.
* The deploy user uses its own sand boxed rvm (no system-wide), so anything ruby is only under the deploy user.
* The user that runs apache does not have access to the ruby environment and it dosen't need to have access as apache dosen't need ruby.
* The deploy user runs a unicorn cluster.
This rvm non-system-wide configuration works great for me. The advantages i see are:
* I don't need to use sudo everytime i install a gem.
* Ruby is sand boxed and only available to the deploy user, thus improving the security of the system by minimalization. Apache dosen't care about ruby, so it dosen't get access it!
The only downside i see is that we cannot use passenger-apache-module or passenger-nginx-modules, but then passenger standalone comes to the rescue!
My Question: Why is everyone on the internet inclined towards using RVM system-wide installation? I could not find a single post about RVM being used in non-sudo mode in production. Am i missing the most critical piece here? I want to know what is not so good about non-sudo rvm installation in production.
Thanks!