evil850209 发表于 2013-1-16 18:19:25

使用rvm在Max os 10.6上安装ruby1.9.3

突然心血来潮想在很久没升级过ruby的mac电脑上安装新版的ruby1.9.3,没想到还非了一番周折。

1 安装 rvm

$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

重新加载shell环境:

$ source ~/.bash_profile

$ rvm requirements

2 安装c编译器

我没有安装xcode,所以需要单独一个c编译器。如果你的系统是10.7,网上很多人也说会因为编译器的版本不同,导致一些问题。这里的建议是到 https://github.com/kennethreitz/osx-gcc-installer/downloads 去下载适合自己系统的编译器。[感谢Vincent的文章 http://www.reai.us/compile-ruby-on-mac-lion]

3 安装ruby1.9.3

$ sudo rvm install 1.9.3

4 更改默认ruby版本

$ rvm --default 1.9.3
页: [1]
查看完整版本: 使用rvm在Max os 10.6上安装ruby1.9.3