6

I have found several threads where other users have had similar issues but none of them are seem to be like this.

After issuing the command:

rbenv install 2.1.3

I get the following errors:

Installing ruby-2.1.3...

BUILD FAILED (OS X 10.10 using ruby-build 20140926)

Inspect or clean up the working tree at /var/folders/y_/5mjltxsn35q0n_k5817bszlw0000gn/T/ruby-build.20141010202255.63586
Results logged to /var/folders/y_/5mjltxsn35q0n_k5817bszlw0000gn/T/ruby-build.20141010202255.63586.log

Last 10 log lines:
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for cd using physical directory... cd -P
checking whether CFLAGS is valid... no
configure: error: something wrong with CFLAGS=" -O3 -Wno-error=shorten-64-to-32  "
make: *** No targets specified and no makefile found.  Stop.
damianesteban
  • 1,603
  • 1
  • 19
  • 36
  • 1
    From [here](https://github.com/sstephenson/rbenv/issues/610), have you tried this? `RUBY_CONFIGURE_OPTS="--without-gcc --disable-install-rdoc" rbenv install 2.1.3` – Nick Veys Oct 11 '14 at 03:32

2 Answers2

10

The Homebrew package for gcc on Yosemite seems to be broken. That's why it doesn't work.

Had the same issue. Running:

CC=/usr/bin/gcc rbenv install 2.1.3

worked for me.

Daniel
  • 4,082
  • 3
  • 27
  • 46
  • The home-brew package appears to be fixed. `brew update && brew upgrade ruby-build` should now sort it :) – Sam Salisbury Jan 16 '15 at 17:02
  • My issue with `config.guess already exists config.sub already exists` was solved with this, after so many other attempts. Fantastic!!! – harshainfo Mar 08 '19 at 05:08
0

This has been fixed in ruby-build for rbenv. Please update by the following:

cd ~/.rbenv/plugins/ruby-build/
git pull
the Tin Man
  • 158,662
  • 42
  • 215
  • 303
toothrot
  • 126
  • 6