Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # How to install Ruby 2.0.0-p247 on Mac OSX 10.7+
- ## RVM:
- ```
- rvm get stable && rvm reload
- ```
- Firstly, the OpenSSL comes with your OSX 10.7+ is outdated, you need to get latest version
- ```
- rvm pkg install openssl
- ```
- Secondly, the readline library on OSX 10.7+ suffers UTF-8 issue in which method in UTF-8 is converted to characters under `irb`, the
- fix is to use latest version
- ```
- rvm pkg install readline
- ```
- And you can install Ruby 2.0.0-p247 with:
- ```
- rvm reinstall 2.0.0 --with-readline-dir=$rvm_path/usr --with-openssl-dir=$rvm_path/usr
- ```
- Please note that `clang-425.0.24` that comes with Xcode successfully compile the source, should you bump into any compilation issue, you could try compiling it with `gcc-422`
- ## rbenv
- Make sure your `ruby-build` is up-to-date:
- ```
- cd ~/.rbenv/plugins/ruby-build && git pull
- ```
- rbenv does not fetch fixed readline lib, thus you are required to install them manually with `brew`:
- ```
- brew update
- brew install readline openssl
- CONFIGURE_OPTS="--with-readline-dir=`brew --prefix readline` --with-openssl-dir=`brew --prefix openssl`" rbenv install 2.0.0-p247
- ```
- ## chruby + ruby-build
- If you happen to use something simpler than rbenv and rvm, such as chruby, you can still use ruby-build to compile ruby into
- your local `~/.rubies` folder with:
- ```
- brew update
- brew install readline openssl
- CONFIGURE_OPTS="--with-readline-dir=`brew --prefix readline` --with-openssl-dir=`brew --prefix openssl`" ruby-build 2.0.0-p247 ~/.rubies/ruby-2.0.0-p247
- ```
- then insert into the top of your `~/.bash_profile` to use it by default:
- ```
- chruby ruby-2.0.0-p247
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement