첫번째, RVM(Ruby Version Manager) 설치
어떻게 설치하나 RVM 홈페이지에 방문해 보니, 아래 명령을 실행해서 설치하라고 나오더군요.
\curl -L https://get.rvm.io | bash -s stable --ruby
그래서 고민없이 실행해 보았습니다. 아래는 모두 위 명령을 실행한 후 나타난 메시지 입니다.
rosebook:~ rose$ \curl -L https://get.rvm.io | bash -s stable --ruby
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 185 100 185 0 0 92 0 0:00:02 0:00:02 --:--:-- 180
100 10956 100 10956 0 0 2573 0 0:00:04 0:00:04 --:--:-- 8008
Please read and follow further instructions.
Press ENTER to continue.
Downloading RVM from wayneeseguin branch stable
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 131 100 131 0 0 51 0 0:00:02 0:00:02 --:--:-- 66
100 1243k 100 1243k 0 0 157k 0 0:00:07 0:00:07 --:--:-- 338k
Upgrading the RVM installation in /Users/rose/.rvm/
RVM PATH line found in /Users/rose/.bashrc /Users/rose/.zshenv.
RVM sourcing line found in /Users/rose/.bash_profile /Users/rose/.zprofile.
rvm 은 ~/.rvm 에 설치 되고, rvm 에 대한 PATH 는 ~/.bashrc 과 ~/.zshenv 에, rvm 소스를 읽어 들이는 부분은 ~/.bash_profile 과 ~/.zprofile 에 추가되었다는 메시지가 보입니다.
Upgrade Notes:
* If you wish to get more default(global) gems installed, install RVM with this flag: --with-gems="pry vagrant"
this option is remembered, it's enough to use it once.
# RVM: Shell scripts enabling management of multiple ruby environments.
# RTFM: https://rvm.io/
# HELP: http://webchat.freenode.net/?channels=rvm (#rvm on irc.freenode.net)
# Cheatsheet: http://cheat.errtheblog.com/s/rvm/
# Screencast: http://screencasts.org/episodes/how-to-use-rvm
위에 스크린케스트는 설치 명령어나 출력 메시지가 지금과는 다르지만 rvm 이해에 도움이 되더군요.
# In case of any issues read output of 'rvm requirements' and/or 'rvm notes'
Upgrade of RVM in /Users/rose/.rvm/ is complete.
# BYUN Sangpil,
#
# Thank you for using RVM!
# I sincerely hope that RVM helps to make your life easier and
# more enjoyable!!!
#
# ~Wayne
Thank you Wayne E. Seguin and Thank you Michal Papis.
rvm 1.17.6 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
No binary rubies available for: downloads/ruby-1.9.3-p362.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing Ruby from source to: /Users/rose/.rvm/rubies/ruby-1.9.3-p362, this may take a while depending on your cpu(s)...
ruby-1.9.3-p362 - #downloading ruby-1.9.3-p362, this may take a while depending on your connection...
ruby-1.9.3-p362 - #extracting ruby-1.9.3-p362 to /Users/rose/.rvm/src/ruby-1.9.3-p362
ruby-1.9.3-p362 - #extracted to /Users/rose/.rvm/src/ruby-1.9.3-p362
ruby-1.9.3-p362 - #configuring
ruby-1.9.3-p362 - #compiling
ruby-1.9.3-p362 - #installing
Removing old Rubygems files...
Installing rubygems-1.8.24 for ruby-1.9.3-p362 ...
Installation of rubygems completed successfully.
Saving wrappers to '/Users/rose/.rvm/bin'.
ruby-1.9.3-p362 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-1.9.3-p362 - #importing default gemsets (/Users/rose/.rvm/gemsets/), this may take time ...
Install of ruby-1.9.3-p362 - #complete
Creating alias default for ruby-1.9.3-p362.
Recording alias default for ruby-1.9.3-p362.
Creating default links/files
Saving wrappers to '/Users/rose/.rvm/bin'.
* To start using RVM you need to run `source /Users/rose/.rvm/scripts/rvm`
in all your open shell windows, in rare cases you need to reopen all shell windows.
rosebook:~ rose$
기본적으로 ruby 1.9.3 버전과, rubygems-1.8.24 를 설치해 줬습니다.
루비 개발환경 셋팅 끝!