I’m trying to install RVM into /usr/local/rvm because I need the ability to run ruby as a server. However, whenever I run:
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
it defaults to my home directory, /home/<user>/.rvm.
I’ve tried running:
sudo bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
as well as enabling the Ubuntu root password and logging in with the root account, but the install always defaults to my home directory. How can I fix this, or would it be easier to just install Ruby from source?
In my opinion, RVM on a production host isn’t as useful as it is for a developer’s sandbox. I think RVM is a great tool but it isn’t for every situation.
Developers need a lot of flexibility for using different versions of Ruby, and for using specific versions of gems. RVM shines for that. It makes it easy to switch automatically, to test against all versions of Ruby installed, or, if things go haywire, to blow it all away and start over quickly.
In a production server environment, where you generally dedicate a host to a particular service, or a set of related services, the need to quickly switch between various Rubies and gem sets tends to disappear. I put only one version of Ruby on mine. All apps point at it. IF I needed more than one, I’d install it into a separate
/optor/localdirectory hierarchy, and set my PATH for the owning account to point to the needed version. In production that’s usually a set once and forget situation.