Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use rvm (ruby version manager) with root account?

Tags:

rvm

root

The whole point of rvm is to be able to install multiple rubies and access them from a user account. What do you do when you need to access any of those rubies from root? Or use gems installed in one of those rvms?

Is there an elegant (or even hackish) way to use these I haven't considered?

My guess is that I should just add it to my PATH, but I'm curious if anyone has come up with a better idea. I'd rather not install rvm just for the root account and duplicate everything.

like image 744
Jade Avatar asked Apr 11 '10 18:04

Jade


People also ask

How do I change the default version of RVM?

Try running rvm --default 1.9. 2 instead. That works for me. Did you accidentally put the line to load rvm in your bashrc instead of your bash_profile ?


1 Answers

I found the solution:

rvmsudo does the trick.

like image 93
Jade Avatar answered Oct 27 '22 08:10

Jade