RVM install for multi user

How to install RVM for multi user.

RVM 설치하기
참고:

다중사용자 설정

sudo curl -sSL https://get.rvm.io | sudo bash -s stable

아래 내용처럼 나올 경우

Downloading https://github.com/rvm/rvm/archive/1.26.11.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.26.11/1.26.11.tar.gz.                                    asc
gpg: Signature made Tue 31 Mar 2015 06:52:13 AM KST using RSA key ID BF04FF17
gpg: Can't check signature: No public key
Warning, RVM 1.26.0 introduces signed releases and automated check of signatures                                     when GPG software found.
Assuming you trust Michal Papis import the mpapis public key (downloading the si                                    gnatures).

GPG signature verification failed for '/usr/local/rvm/archives/rvm-1.26.11.tgz'                                     - 'https://github.com/rvm/rvm/releases/download/1.26.11/1.26.11.tar.gz.asc'!
try downloading the signatures:

    sudo gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A170                                    3113804BB82D39DC0E3

or if it fails:

    command curl -sSL https://rvm.io/mpapis.asc | sudo gpg2 --import -

the key can be compared with:

    https://rvm.io/mpapis.asc
    https://keybase.io/mpapis

공개키가 없다고 하니 공개키를 받아줘야할 듯.
콘솔 창에 나온데로 실행한다.

sudo gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3

그리고 다시 첫번째 명령 실행

rvm이 잘 설치되었는지 아래 명령을 통해 확인한다.

type rvm | head -n 1

rvm is a function
이라고 나오면 정상

rvm을 사용할 계정을 rvm group에 포함시킨다.

sudo vi /etc/group

...

rvm:x:505:user,user2,user3

이제 rvm을 사용할 계정으로 다시 로그인 한다.
로그인을 다시 하는 이유는 rvm이 로그인 시간정보를 가지고 유효한 유저인지 판별하기 때문인 듯 하다. 공식사이트에서 확인해보시길.

설치 가능 목록 확인

rvm list known

2.0.0 설치

rvm install 2.0.0

여러 유저가 사용하므로 ruby에서 참조하는 gem을 다르게 할 수 있다.

rvm use 2.0.0@newgemset --create --default

newgemset 이라는 gem set을 만들어서 기본으로 사용하라는 명령이다. 이름은 마음대로 바꾸자.

[ruby] rvm 설치하기 (단일 사용자 설정)

How to install RVM for Single user.

단일 사용자 설정

root 유저가 아닌 일반 계정으로 Ruby RVM 설치하기!

bash < <(curl -L https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
source .bash_profile
type rvm | head -1

성공시: rvm is a function

설치 가능한 목록

rvm list known
rvm install 2.0.0