I love RVM. I realize that the main use case for it is letting different users switch between different versions of Ruby. But let's say I'm deploying a Rails app to a server and I just want a single version of Ruby running. In particular, I want 1.9.2, which is a breeze to install with RVM but a pain without it. Is there a way that I can say "I want this to be the canonical Ruby installation for all users" (along with all of its gems) without having to create a bunch of symlinks by hand and change them every time I update to a newer Ruby release?
A:
Install RVM as root and do a sudo rvm use 1.9.2 --default
. Any user sourcing /usr/local/rvm/scripts/rvm
will per default have 1.9.2.
Konstantin Haase
2010-06-13 19:37:04
If you have further questions about RVM, there are people willing to help 24/7 in the #rvm channel on freenode: http://webchat.freenode.net/?channels=rvm.
Konstantin Haase
2010-06-14 08:56:09
I'm not sure what you mean by "Any user sourcing `/usr/local/rvm/scripts/rvm`"... I'm thinking in terms of: If I have a web server that runs my Rails app, I want to be sure that it's using Ruby 1.9.2 and the corresponding gems. How do I make the web server user use RVM?
Trevor Burnham
2010-06-14 14:16:39
That really depends on what webserver you use. Sourcing means loading that file into your environment (i.e. place the line `source /usr/local/rvm/scripts/rvm` in your `/etc/bashrc` or something). Making sure your webserver uses 1.9.2 is essentially the same as making sure it uses the system ruby: It has to be first in the path. That, among other things, is what the rvm sourcing takes care of.
Konstantin Haase
2010-06-14 14:50:30