Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Failed to download ruby

Tryed to download ruby version 2.0.0-p353 but i get this error message.

BUILD FAILED

Inspect or clean up the working tree at /var/folders/zs/z38_8dks73n8n6rky6plxvwr0000gn/T/ruby-build.20140514141035.57306
Results logged to /var/folders/zs/z38_8dks73n8n6rky6plxvwr0000gn/T/ruby-build.20140514141035.57306.log

Last 10 log lines:
/var/folders/zs/z38_8dks73n8n6rky6plxvwr0000gn/T/ruby-build.20140514141035.57306/ruby-2.0.0-p353 /var/folders/zs/z38_8dks73n8n6rky6plxvwr0000gn/T/ruby-build.20140514141035.57306 /
configure: WARNING: unrecognized options: --with-libyaml-dir, --with-openssl-dir, --with-readline-dir
checking build system type... i386-apple-darwin13.1.0
checking host system type... i386-apple-darwin13.1.0
checking target system type... i386-apple-darwin13.1.0
checking whether the C compiler works... no
configure: error: in `/var/folders/zs/z38_8dks73n8n6rky6plxvwr0000gn/T/ruby-build.20140514141035.57306/ruby-2.0.0-p353':
configure: error: C compiler cannot create executables
See `config.log' for more details
make: *** No targets specified and no makefile found.  Stop.

Thanks!

7 Answers

also possibly try exporting the following CC variable:

$ export CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc

I get

clang: error: no input files

ok thats good. well your compiler seems to be installed then. try opening that config.log file in a text editor (i think its located here /var/folders/zs/z38_8dks73n8n6rky6plxvwr0000gn/T/ruby-build.20140514142457.57776/ruby-2.0.0-p353 ruby-2.0.0-p353 might not be a directory so you might have to try /var/folders/zs/z38_8dks73n8n6rky6plxvwr0000gn/T/ruby-build.20140514142457.57776/

list those directories and see if you can find that log file

Naomi Freeman
STAFF
Naomi Freeman
Treehouse Guest Teacher

I checked on Github and it's a known issue in Ruby. I can't seem to find a resolution.

Maybe try to install homebrew instead: http://brew.sh/

and then from there install ruby: https://www.ruby-lang.org/en/installation/#homebrew

Thanks for the quick reply. Is homebrew like rbenv?

hmm. try installing the xcode command line tools by running the following command:

$ xcode-select --install

then try installing your ruby again

Thank you for the quick response. I tried installing xcode and I still get a error message but its different now.

Last 10 log lines:
/var/folders/zs/z38_8dks73n8n6rky6plxvwr0000gn/T/ruby-build.20140514142457.57776/ruby-2.0.0-p353 /var/folders/zs/z38_8dks73n8n6rky6plxvwr0000gn/T/ruby-build.20140514142457.57776 /
configure: WARNING: unrecognized options: --with-libyaml-dir, --with-openssl-dir, --with-readline-dir
checking build system type... i386-apple-darwin13.1.0
checking host system type... i386-apple-darwin13.1.0
checking target system type... i386-apple-darwin13.1.0
checking whether the C compiler works... no
configure: error: in `/var/folders/zs/z38_8dks73n8n6rky6plxvwr0000gn/T/ruby-build.20140514142457.57776/ruby-2.0.0-p353':
configure: error: C compiler cannot create executables
See `config.log' for more details
make: *** No targets specified and no makefile found.  Stop.

No wait its the same error message

type

$ gcc

and see what output you get.

Ok I found the log file.

try exporting the CC variable as well. and post contents of log file if that does not work

I think that did the trick. Its still installing!

Stone Preston thank you that solved the problem!