牌語備忘録 -pygo

あくまでもメモです。なるべくオフィシャルの情報を参照してください。

牌語備忘録 -pygo

RVM で Ruby のバージョンをあげようとしたらうまくいかなかった件

$ rvm list

rvm rubies

=> ruby-1.9.2-p290 [ x86_64 ]
   ruby-1.9.3-p0 [ x86_64 ]

$ rvm upgrade ruby-1.9.3-p0
rvm upgrade ruby-1.9.3-p0
Are you sure you wish to upgrade from ruby-1.9.3-p0 to ruby-1.9.3-p0? (Y/n):n

ん?「p0」になってる。

新しいやつ読み込む


こうやるらしい

rvm get head
rvm reload
そんでコンパイルでエラー
$ rvm install 1.9.3
rvm install 1.9.3
gcc-4.2: error trying to exec '/usr/bin/i686-apple-darwin11-gcc-4.2.1': execvp: No such file or directory
Installing Ruby from source to: /Users/username/.rvm/rubies/ruby-1.9.3-p194, this may take a while depending on your cpu(s)...

ruby-1.9.3-p194 - #fetching 
ruby-1.9.3-p194 - #extracted to /Users/username/.rvm/src/ruby-1.9.3-p194 (already extracted)
ruby-1.9.3-p194 - #configuring 
Error running ' ./configure --prefix=/Users/username/.rvm/rubies/ruby-1.9.3-p194 --enable-shared --disable-install-doc --with-libyaml --with-opt-dir=/Users/username/.rvm/usr ', please read /Users/username/.rvm/log/ruby-1.9.3-p194/configure.log
There has been an error while running configure. Halting the installation.
--with-gcc=clang

Mac だと 「--with-gcc=clang」付けないとコンパイルできないみたい。
update もうまくいかないっぽい。
なのでインストールしてしまお

$ rvm install 1.9.3 --with-gcc=clang 
rvm install 1.9.3 --with-gcc=clang 
clang: error: unsupported option '--with-libyaml'
Installing Ruby from source to: /Users/username/.rvm/rubies/ruby-1.9.3-p194, this may take a while depending on your cpu(s)...

ruby-1.9.3-p194 - #fetching 
ruby-1.9.3-p194 - #extracted to /Users/username/.rvm/src/ruby-1.9.3-p194 (already extracted)
ruby-1.9.3-p194 - #configuring 
ruby-1.9.3-p194 - #compiling 
ruby-1.9.3-p194 - #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   169k      0  0:00:02  0:00:02 --:--:--  176k
Extracting rubygems-1.8.24 ...
Removing old Rubygems files...
Installing rubygems-1.8.24 for ruby-1.9.3-p194 ...
Installation of rubygems completed successfully.
ruby-1.9.3-p194 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-1.9.3-p194 - #importing default gemsets (/Users/username/.rvm/gemsets/)
Install of ruby-1.9.3-p194 - #complete 

use と default やって確認

$ rvm use 1.9.3
rvm use ruby-1.9.3-p194
Using /Users/username/.rvm/gems/ruby-1.9.3-p194
$ rvm --default ruby-1.9.3-p194
rvm --default 1.9.3-p194
$ rvm list
rvm list

rvm rubies

   ruby-1.9.2-p290 [ x86_64 ]
   ruby-1.9.3-p0 [ x86_64 ]
=* ruby-1.9.3-p194 [ x86_64 ]

# => - current
# =* - current && default
#  * - default

Link

参考サイト