1

On a CentOS 6 server I accidentally installed rvm and a bunch of gems as non-root user. Everything is running well, however I'll need to run rvm scripts as super user later. I'd like to fix my configuration and make rvm available to root by default.

Is it a bad practice if I try to make rvm available for root by default? And is it possible to move rvm and all gems in a clean way to another user (i.e. root)?

I'm not experienced in this field, the options I'm considering are:

  1. export the current rvm path to $PATH for root (by editing etc/rc.d/rc.local)
  2. adding a script to do the same as above but in etc/profile.d/rvm.sh
  3. remove and reinstall rvm as root

I have a feeling that 1. and 2. will work, but it is not a good approach. Re-installing rvm I'm afraid may mess up some dependencies.

I realize it's a basic question, thank you for your time and understanding in advance.

0

I ended up reinstalling rvm.

There is a function to add managers, however it requires that Mult-User is enabled from a super user installation.

From the RVM guided installation:

  • After following above instructions for Multi-User.

  • For each user that want to use RVM, an additional command needs to be run (once) for each user:

rvm user gemsets

but the Multi-User function should have been enabled first:

The (Multi-User) rvm function will be automatically configured for every user on the system if you install with sudo.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.