Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use RVM to maintain a single version of Ruby for all users?

Tags:

ruby

rubygems

rvm

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?

like image 437
Trevor Burnham Avatar asked Jun 13 '10 18:06

Trevor Burnham


People also ask

Which is better RVM or Rbenv?

RVM is easier to install than Rbenv, RVM has more features than Rbenv, RVM includes a built-in Ruby installation mechanism while Rbenv does not.

What is RVM used for?

RVM is a command-line tool that allows you to easily install, manage, and work with multiple ruby environments from interpreters to sets of gems. Ruby Version Manager, often abbreviated as RVM, is a software platform for Unix-like operating systems designed to manage multiple installations of Ruby on the same device.

Is RVM deprecated?

Is RVM deprecated? ∞RVM Packages This functionality has been deprecated by autolibs which is now enabled by default, however if you still need it - it is there.


1 Answers

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.

like image 199
Konstantin Haase Avatar answered Sep 30 '22 03:09

Konstantin Haase