본문 바로가기
개발/ruby

Install RVM on Ubuntu

by 감토끼 2010. 11. 21.


Install RVM (Ruby Version Manager)

rvm 을 이용하면 여러 버전의 루비를 사용할 수 있다고 합니다.



위에 문서들을 보고 나름 따라한것인데 제 문서가 완전 정확하다고는 말할 수 없습니다. ㅜ.ㅜ 일단 제 컴에서는 잘 됩니다. 

GitHub Repository 을 통해 설치하는 것이 recommanded 라고 쓰여 있습니다.


$ sudo apt-get install curl git-core
$ bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )


그 다음에 홈디렉토리의 .bashrc 을 편집합니다.


# If not running interactively, don't do anything
[ -z "$PS1" ] && return

#some codes..
#some codes..
#some codes..

HISTCONTROL=ignoredups:ignorespace

이 부분을 다음과 같이 바꾸어 줍니다.

# If not running interactively, don't do anything
#[ -z "$PS1" ] && return
if [[ -n "$PS1" ]]; then
#some codes..
#some codes..
#some codes..

HISTCONTROL=ignoredups:ignorespace

fi
# This loads RVM into a shell session.
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"  




저장하고 터미널을 새로  열고 
$ type rvm | head -n1
을 입력하여 확인합니다. rvm is a function 라는 문구가 뜨면 성공입니다.


이제 루비를 설치 할 수 있습니다.
$ rvm install 1.8.7
$ rvm install 1.9.2
$ rvm --defalut 1.8.7

$ rvm  list  을 입력하면 설치된 루비를 확인 할 수 있습니다. default 설정을 꼭 해줘야 사용할 수 있다고 합니다.



'개발 > ruby' 카테고리의 다른 글

install ree(ruby enterprise edition) on ubuntu  (2) 2011.04.04
install ruby 1.8.7 on ubuntu  (0) 2011.04.04
루비 1.9 소개 슬라이드  (0) 2010.11.21
내가 만든 정규식!  (0) 2010.08.19
루비 정규식  (0) 2010.08.16