I'm confused about whether, on a server, you're supposed to install RVM as a regular user or do a system-wide installation, and, if the latter, how you're supposed to do things like bundle install
without using sudo
.
Is there any definite set of guidelines on what you're supposed to do as far as RVM is concerned on a server running Rails under e.g. Passenger and Nginx? In this type of environment, not all Ruby processes run under the same user, so I think that's where things get unclear as far as RVM and bundler are concerned.
How about just avoiding RVM all together on the server and just installing Ruby and gems the old fashioned way there? Is that preferable if you can get away with it?
You could install RVM as a regular user, although I don't see the point. Bundler is per-application and doesn't need sudo privileges since it can install your gems into a bundle directory that the bundle install user can access with, for instance:
bundle install --deployment
which will put them in vendor/bundle
by default.
I think of RVM as a development tool for managing multiple ruby versions. On deployment machines I tend to either use system Ruby or install from source.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With