Installing Ruby 2.0.0 on Mac OS 10.8.2 with MacPorts
As Ruby experiences some problems installing on Mac OS 10.8.2, here's the way I've managed to deal with it.
First you need to install XCode command line tools from here https://developer.apple.com/xcode/
Create file ~/.rvmrc with the following content:
export CFLAGS="-O2 -arch x86_64"
export LDFLAGS="-L/opt/local/lib"
export CPPFLAGS="-I/opt/local/include"
Then install openssl library using MacPorts and Ruby using RVM
sudo port install openssl +universal
export CC=gcc
rvm install 2.0.0 --with-openssl-dir=/opt/local/ --with-opt=/opt/local/
Optionally you can install Rails as usual:
gem install rails
Voila!
Written by Maxim Smirnov
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#