开发者

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

The whole point of rvm is to b开发者_Go百科e 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.


I found the solution:

rvmsudo does the trick.


System wide install is no longer exist.

Use this command in Ubuntu console to install rvm as root and be available for all users:

curl -L https://get.rvm.io | sudo bash


Though, I am little late, you don't really have to use rvmsudo. Just make sure that you have .rvm directory and its structure created inside your home directory. Then, each of rvm command will do respective installations on user's home directory.

You can achieve this by simply running following command.

rvm user all

Reference, https://rvm.io/rvm/install/ (MultiUser installation)


This may help: http://rvm.io/deployment/ (updated) (EDIT: the instructions might be broken)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜