Skip to content

Instantly share code, notes, and snippets.

@dx7
Created April 27, 2012 17:44
Show Gist options
  • Select an option

  • Save dx7/2511153 to your computer and use it in GitHub Desktop.

Select an option

Save dx7/2511153 to your computer and use it in GitHub Desktop.
Install Ruby 1.9.2 with rvm without remove Xcode 4.3
# Run:
# bash < <(curl -Ls https://raw.github.com/gist/2511153)
# Source: http://caiustheory.com/install-gcc-421-apple-build-56663-with-xcode-42
echo "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
echo "Setup some stuff it requires."
mkdir -p build/obj build/dst build/sym
echo "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
echo "And finally install it."
sudo ditto build/dst /
echo "So install Ruby 1.9.2."
CC=/usr/bin/gcc-4.2 rvm install 1.9.2
echo "Done."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment