Skip to content

Instantly share code, notes, and snippets.

@tejanium
Created October 4, 2012 07:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tejanium/3831948 to your computer and use it in GitHub Desktop.
Save tejanium/3831948 to your computer and use it in GitHub Desktop.
~ $ rvm requirements
Notes for Mac OS X 10.8.2, Xcode 4.5.
For JRuby: Install the JDK. See http://developer.apple.com/java/download/ # Current Java version "1.6.0_26"
For IronRuby: Install Mono >= 2.6
For Ruby 1.9.3: Install libksba # If using Homebrew, 'brew install libksba'
To use an RVM installed Ruby as default, instead of the system ruby:
rvm install 1.8.7 # installs patch 357: closest supported version
rvm system ; rvm gemset export system.gems ; rvm 1.8.7 ; rvm gemset import system.gems # migrate your gems
rvm alias create default 1.8.7
And reopen your terminal windows.
Xcode and gcc:
Right now Ruby requires gcc to compile, but Xcode 4.2 and later no longer ship with gcc. Instead they ship with llvm-gcc (to which gcc is a symlink) and clang, neither of which are supported for building Ruby. Xcode 4.1 was the last version to ship gcc, which was /usr/bin/gcc-4.2.
Xcode 4.1 and earlier:
- Ruby will build fine.
Xcode 4.2 and later (including Command Line Tools for Xcode):
- If you have gcc-4.2 (and friends) from an earlier Xcode version, Ruby will build fine.
- If you don't have gcc-4.2, you have two options to get it:
* Install apple-gcc42 from Homebrew
* Install osx-gcc-installer
Homebrew:
If you are using Homebrew, you can install the apple-gcc42 and required libraries from homebrew/dupes:
brew update
brew tap homebrew/dupes
brew install autoconf automake apple-gcc42
rvm pkg install openssl
Xcode 4.2+ install or/and Command Line Tools for Xcode is required to provide make and other tools.
osx-gcc-installer:
If you don't use Homebrew, you can download and install osx-gcc-installer: https://github.com/kennethreitz/osx-gcc-installer.
Warning: Installing osx-gcc-installer on top of a recent Xcode is known to cause problems, so you must uninstall Xcode before installing osx-gcc-installer. Afterwards you may install Xcode 4.2+ or Command Line Tools for Xcode if you desire.
** NOTE: Currently, Node.js is having issues building with osx-gcc-installer. The only fix is to install Xcode over osx-gcc-installer.
~ $ brew update
Already up-to-date.
~ $ brew tap homebrew/dupes
Error: Already tapped!
~ $ brew install autoconf automake apple-gcc42
Error: autoconf-2.69 already installed
Error: automake-1.12.4 already installed
Error: apple-gcc42-4.2.1-5666.3 already installed
~ $ brew remove autoconf automake apple-gcc42
Uninstalling /usr/local/Cellar/autoconf/2.69...
Uninstalling /usr/local/Cellar/automake/1.12.4...
Uninstalling /usr/local/Cellar/apple-gcc42/4.2.1-5666.3...
~ $ brew install autoconf automake apple-gcc42
==> Downloading http://ftpmirror.gnu.org/autoconf/autoconf-2.69.tar.gz
Already downloaded: /Library/Caches/Homebrew/autoconf-2.69.tar.gz
==> Patching
patching file bin/autoreconf.in
==> ./configure --prefix=/usr/local/Cellar/autoconf/2.69
==> make install
/usr/local/Cellar/autoconf/2.69: 67 files, 1.9M, built in 12 seconds
==> Downloading http://ftpmirror.gnu.org/automake/automake-1.12.4.tar.gz
Already downloaded: /Library/Caches/Homebrew/automake-1.12.4.tar.gz
==> ./configure --prefix=/usr/local/Cellar/automake/1.12.4
==> make install
/usr/local/Cellar/automake/1.12.4: 129 files, 2.0M, built in 9 seconds
==> Downloading http://r.research.att.com/tools/gcc-42-5666.3-darwin11.pkg
Already downloaded: /Library/Caches/Homebrew/apple-gcc42-4.2.1-5666.3.pkg
==> Caveats
NOTE:
This formula provides components that were removed from XCode in the 4.2
release. There is no reason to install this formula if you are using a
version of XCode prior to 4.2.
This formula contains compilers built from Apple's GCC sources, build
5666.3, available from:
http://opensource.apple.com/tarballs/gcc
All compilers have a `-4.2` suffix. A GFortran compiler is also included
and is the exact same version as the compiler provided by the `gfortran`
formula in the main repository.
==> Summary
/usr/local/Cellar/apple-gcc42/4.2.1-5666.3: 104 files, 75M, built in 5 seconds
~ $ rvm pkg install openssl
Fetching openssl-1.0.1c.tar.gz to /Users/teja/.rvm/archives
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 4352k 100 4352k 0 0 50886 0 0:01:27 0:01:27 --:--:-- 39454
Extracting openssl-1.0.1c.tar.gz to /Users/teja/.rvm/src
Configuring openssl in /Users/teja/.rvm/src/openssl-1.0.1c.
Compiling openssl in /Users/teja/.rvm/src/openssl-1.0.1c.
Installing openssl to /Users/teja/.rvm/usr
Please note that it's required to reinstall all rubies:
rvm reinstall all --force
Updating openssl certificates
~ $ CC=/usr/local/bin/gcc-4.2 rvm reinstall 1.9.3 --patch falcon --force-autoconf -j 3
/Users/teja/.rvm/src/ruby-1.9.3-p194 has already been removed.
Removing /Users/teja/.rvm/rubies/ruby-1.9.3-p194...
Installing Ruby from source to: /Users/teja/.rvm/rubies/ruby-1.9.3-p194, this may take a while depending on your cpu(s)...
ruby-1.9.3-p194 - #downloading ruby-1.9.3-p194, this may take a while depending on your connection...
ruby-1.9.3-p194 - #extracting ruby-1.9.3-p194 to /Users/teja/.rvm/src/ruby-1.9.3-p194
ruby-1.9.3-p194 - #extracted to /Users/teja/.rvm/src/ruby-1.9.3-p194
Applying patch /Users/teja/.rvm/patches/ruby/1.9.3/p194/falcon.diff
ruby-1.9.3-p194 - #autoreconf-f
Error running 'autoreconf -f', please read /Users/teja/.rvm/log/ruby-1.9.3-p194/autoreconf.log
Skipping configure step, 'configure' does not exist, did autoreconf not run successfully?
ruby-1.9.3-p194 - #compiling
Error running 'make -j3', please read /Users/teja/.rvm/log/ruby-1.9.3-p194/make.log
There has been an error while running make. Halting the installation.
~ $
@adamzerner
Copy link

did this succeed in installing ruby 1.9.3? it doesn't seem so.

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