Created
November 5, 2012 02:28
-
-
Save sferik/4014963 to your computer and use it in GitHub Desktop.
Instructions to install on Ruby 2.0.0 on Mac OS X with homebrew
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
brew update | |
brew install rbenv | |
brew install ruby-build | |
brew install openssl | |
CONFIGURE_OPTS=--with-openssl-dir=`brew --prefix openssl` rbenv install 2.0.0-preview1 |
Should be RUBY_CONFIGURE_OPTS
I still had issues. I had to add a few lines to the top of ext/openssl/openssl_missing.h in addition to specifying homebrew installed openssl. Details of what worked for me here: https://gist.github.com/timcharper/5778185
Here's the command I used for installing for development purposes --
CC=gcc-4.7 RUBY_CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix openssl` --with-readline-dir=`brew --prefix readline` --with-gcc=gcc-4.7 --enable-shared" rbenv install --keep 2.0.0-p195
The -k
is for --keep
, which I seem to need since I'm developing Ruby C extensions.
I also found it necessary to use CC=gcc-4.7
because otherwise it would ALWAYS insist upon appending this Wshorten-64-to-32
flag, no matter which compiler I was using to build extensions. --with-gcc=gcc-4.7
is insufficient.
Note: This also seems to work with later GCC versions. I've tested with 4.8 and 4.9 also, but it's been a while.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
got the same error when trying to install p195 :(
please tell me if this worked for you:
https://gist.github.com/lpsBetty/5584686