-
-
Save sferik/4014963 to your computer and use it in GitHub Desktop.
#!/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 |
got the same error when trying to install p195 :(
please tell me if this worked for you:
https://gist.github.com/lpsBetty/5584686
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.
i already have xcode command line tools installed.. (but not the full xcode)