Ben Woodall

Last of the freelance hackers - Greatest sword fighter in the world

Installing Ruby 2.0.0-rc2 on OSX

ruby

This took me WAY too long to figure out, but it seems like a LOT of people have trouble installing ruby-2.0.0 on OSX.

I assumed installing 2.0.0-rc2 would be easy using rbenv:

1
rbenv install 2.0.0-rc2

But it didn’t turn out that easy:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Downloading openssl-1.0.1e.tar.gz...
-> https://www.openssl.org/source/openssl-1.0.1e.tar.gz
Installing openssl-1.0.1e...

BUILD FAILED

Inspect or clean up the working tree at /var/folders/cy/yn06vn5j6psfz7y2q83xqd7c0000gn/T/ruby-build.20130212134232.22481
Results logged to /var/folders/cy/yn06vn5j6psfz7y2q83xqd7c0000gn/T/ruby-build.20130212134232.22481.log

Last 10 log lines:
x openssl-1.0.1e/VMS/TODO
x openssl-1.0.1e/VMS/ucx_shr_decc_log.opt
x openssl-1.0.1e/VMS/ucx_shr_decc.opt
x openssl-1.0.1e/VMS/ucx_shr_vaxc.opt
x openssl-1.0.1e/VMS/VMSify-conf.pl
x openssl-1.0.1e/VMS/WISHLIST.TXT
/var/folders/cy/yn06vn5j6psfz7y2q83xqd7c0000gn/T/ruby-build.20130212134232.22481/openssl-1.0.1e /var/folders/cy/yn06vn5j6psfz7y2q83xqd7c0000gn/T/ruby-build.20130212134232.22481 ~
Operating system: i686-apple-darwinDarwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64
Configuring for darwin64-x86_64-cc
Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [experimental-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]

Some googleing turned up this issue for rbenv, https://github.com/sstephenson/ruby-build/issues/288, which shows the issue being a problem with version of OpenSSL installed on Mountain Lion.

So I tried the suggested

1
RUBY_CONFIGURE_OPTS=--with-openssl-dir=`brew --prefix openssl` rbenv install 2.0.0-rc2

AND

1
CONFIGURE_OPTS=--with-openssl-dir=`brew --prefix openssl` rbenv install 2.0.0-rc2

AFTER I had used brew to install/upgrade the newest version of OpenSSL. NOTHING WORKED. SAME ERROR.

Problem? It seemed to be an issue with the most current version of rbenv/ruby-build used with brew. So I had to uninstall both from brew and use the git-clone method instead, giving me the newest version.

Installing with

1
RUBY_CONFIGURE_OPTS=--with-openssl-dir=`brew --prefix openssl` rbenv install 2.0.0-rc2

worked just fine after that.

Comments