Skip to content

Instantly share code, notes, and snippets.

@marianposaceanu
Created February 7, 2012 16:57
Show Gist options
  • Save marianposaceanu/1760728 to your computer and use it in GitHub Desktop.
Save marianposaceanu/1760728 to your computer and use it in GitHub Desktop.
rvm_lion_x_code_4_2_1.md

Install RVM

bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" 
function' >> ~/.bash_profile

Install GCC 4.2

Grab and unpack the tarball
$ mkdir ~/tmp && cd ~/tmp
$ curl -O http://opensource.apple.com/tarballs/gcc/gcc-5666.3.tar.gz
$ tar zxf gcc-5666.3.tar.gz
$ cd gcc-5666.3

Setup some stuff it requires
$ mkdir -p build/obj build/dst build/sym
And then build it. You should go make a cup of tea or five whilst this runs.
$ gnumake install RC_OS=macos RC_ARCHS='i386 x86_64' TARGETS='i386 x86_64' \
  SRCROOT=`pwd` OBJROOT=`pwd`/build/obj DSTROOT=`pwd`/build/dst SYMROOT=`pwd`/build/sym

And finally install it
$ sudo ditto build/dst /

Install ruby 1.9.3 and iconv

rvm pkg install iconv // nokogiri
rvm install 1.9.3
rvm use ruby-1.9.3 --default

Carry on from here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment