Just a quick command copy/paste to remind me in the future to help compile/configure ruby 1.8.7 via RVM on Mac OSX 10.8.
$ rvm install 1.8.7 Searching for binary rubies, this might take some time. No binary rubies available for: osx/10.8/x86_64/ruby-1.8.7-p371. Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies. The provided compiler '/usr/bin/gcc' is LLVM based, it is not yet fully supported by ruby and gems, please read `rvm requirements`.
That sucks. Work-around as such:
$ rvm install 1.8.7 --with-gcc=clang Installing Ruby from source to: /Users/name/.rvm/rubies/ruby-1.8.7-p371, this may take a while depending on your cpu(s)... ruby-1.8.7-p371 - #downloading ruby-1.8.7-p371, this may take a while depending on your connection... ruby-1.8.7-p371 - #extracted to /Users/name/.rvm/src/ruby-1.8.7-p371 (already extracted) Patch stdout-rouge-fix was already applied. Patch no_sslv2 was already applied. ruby-1.8.7-p371 - #configuring ruby-1.8.7-p371 - #compiling Error running 'make', please read /Users/name/.rvm/log/ruby-1.8.7-p371/make.log There has been an error while running make. Halting the installation.
Which also sucks. Turns out rvm sort of bugs out for Ruby compiles if it includes tk/tcl support, something you most likely don’t need anyway. Workaround is as such:
$ rvm install 1.8.7 --with-gcc=clang --without-tcl --without-tk Installing Ruby from source to: /Users/name/.rvm/rubies/ruby-1.8.7-p371, this may take a while depending on your cpu(s)... ruby-1.8.7-p371 - #downloading ruby-1.8.7-p371, this may take a while depending on your connection... ruby-1.8.7-p371 - #extracted to /Users/name/.rvm/src/ruby-1.8.7-p371 (already extracted) Patch stdout-rouge-fix was already applied. Patch no_sslv2 was already applied. ruby-1.8.7-p371 - #configuring ruby-1.8.7-p371 - #compiling ruby-1.8.7-p371 - #installing Retrieving rubygems-1.8.25 Extracting rubygems-1.8.25 ... Removing old Rubygems files... Installing rubygems-1.8.25 for ruby-1.8.7-p371 ... Installation of rubygems completed successfully. Saving wrappers to '/Users/name/.rvm/bin'. ruby-1.8.7-p371 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake). ruby-1.8.7-p371 - #importing default gemsets, this may take time ... Install of ruby-1.8.7-p371 - #complete
Win!
$ rvm list rvm rubies ruby-1.8.7-p371 [ i686 ] ruby-1.9.2-p320 [ x86_64 ] ruby-1.9.3-p374 [ x86_64 ]