2012-11-26 3 views
1

나는 Ruby 1.9.3-p327을 설치했다고 생각합니다. 그러나 루비 -v를 할 때 아래에서 볼 수 있듯이 여전히 1.8.7을 출력합니다.Mac OSX에서 1.9.3을 설치 한 후 Ruby 1.8.7이 표시됨

무엇이 잘못 되었나요?

OSX 10.7.5를 사용하고 osx-gcc-installer와 Xcode 4.5.2를 설치했습니다.

업데이트 : /User/teacher/.rvm/bin/folder를 확인했는데 루비 -1.9.3 파일이있는 것으로 나타났습니다.

Last login: Mon Nov 26 19:50:24 on ttys000 
sokada-macbook:~ teacher$ sudo rvm install 1.9.3 
Password: 
No binary rubies available for: downloads/ruby-1.9.3-p327. 
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies. 
Fetching yaml-0.1.4.tar.gz to /Users/teacher/.rvm/archives 
    % Total % Received % Xferd Average Speed Time Time  Time Current 
           Dload Upload Total Spent Left Speed 
100 460k 100 460k 0  0 184k  0 0:00:02 0:00:02 --:--:-- 196k 
Extracting yaml to /Users/teacher/.rvm/src/yaml-0.1.4 
Configuring yaml in /Users/teacher/.rvm/src/yaml-0.1.4. 
Compiling yaml in /Users/teacher/.rvm/src/yaml-0.1.4. 
Installing yaml to /Users/teacher/.rvm/usr 
Installing Ruby from source to: /Users/teacher/.rvm/rubies/ruby-1.9.3-p327, this may take a while depending on your cpu(s)... 
ruby-1.9.3-p327 - #downloading ruby-1.9.3-p327, this may take a while depending on your connection... 
ruby-1.9.3-p327 - #extracting ruby-1.9.3-p327 to /Users/teacher/.rvm/src/ruby-1.9.3-p327 
ruby-1.9.3-p327 - #extracted to /Users/teacher/.rvm/src/ruby-1.9.3-p327 
ruby-1.9.3-p327 - #configuring 
ruby-1.9.3-p327 - #compiling 
ruby-1.9.3-p327 - #installing 
Retrieving rubygems-1.8.24 
    % Total % Received % Xferd Average Speed Time Time  Time Current 
           Dload Upload Total Spent Left Speed 
100 371k 100 371k 0  0 819k  0 --:--:-- --:--:-- --:--:-- 1819k 
Extracting rubygems-1.8.24 ... 
Removing old Rubygems files... 
Installing rubygems-1.8.24 for ruby-1.9.3-p327 ... 
Installation of rubygems completed successfully. 
Saving wrappers to '/Users/teacher/.rvm/bin'. 
ruby-1.9.3-p327 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake). 
ruby-1.9.3-p327 - #importing default gemsets (/Users/teacher/.rvm/gemsets/), this may take time ... 
Install of ruby-1.9.3-p327 - #complete 
'rvm_codesign_identity' is not set, please set it in ~/.rvmrc 
sokada-macbook:~ teacher$ rvm -v 

rvm 1.16.20 (master) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/] 

sokada-macbook:~ teacher$ ruby -v 
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin11.0] 
sokada-macbook:~ teacher$ chmod -x $rvm_path/hooks/after_install_codesign 
sokada-macbook:~ teacher$ ruby -v 
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin11.0] 
sokada-macbook:~ teacher$ 
+0

'/Users/teacher/.rvm/bin/ruby -v'는 어떻습니까? –

+0

'해당 파일 또는 디렉토리 없음'이 표시됩니다. 하지만 그 폴더에서 루비 -1.9.3-p327을 발견했습니다. – shin

답변

4

다운로드 루비 버전을 컴파일 rvm install를 사용하여,하지만 당신은 여전히 ​​당신이 사용하고자하는 버전을 선언해야합니다.

시도 :

$ rvm use 1.9.3-p327 

가 새로 설치 한 루비 버전으로 전환 할 수 있습니다. 버전을 전환하고 기본값으로 설정하려면 :

$ rvm --default use 1.9.3-p327 

rvm website은 더 많은 정보와 멋진 문서를 가지고있다.

+0

방금 ​​"rvm use 1.9.3 --default"를 찾았습니다. 답장을 보내 주셔서 감사합니다. – shin

관련 문제