Ruby Install Error - C compiler cannot create executables

Hello everyone! I am getting the following error when trying to install Ruby 2.3.1

Can anyone provide any help??

MacBook-Pro:~ JenniferKennedy$ rbenv install 2.3.1
ruby-build: use openssl from homebrew
Downloading ruby-2.3.1.tar.bz2…
-> https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.1.tar.bz2
Installing ruby-2.3.1…

BUILD FAILED (OS X 10.13.4 using ruby-build 20180424)

Inspect or clean up the working tree at /var/folders/vl/2dy_p0lj2w97zx8zz7xxbx580000gn/T/ruby-build.20180514163501.8553
Results logged to /var/folders/vl/2dy_p0lj2w97zx8zz7xxbx580000gn/T/ruby-build.20180514163501.8553.log

Last 10 log lines:
config.guess already exists
config.sub already exists
checking build system type… x86_64-apple-darwin17.5.0
checking host system type… x86_64-apple-darwin17.5.0
checking target system type… x86_64-apple-darwin17.5.0
checking whether the C compiler works… no
configure: error: in /var/folders/vl/2dy_p0lj2w97zx8zz7xxbx580000gn/T/ruby-build.20180514163501.8553/ruby-2.3.1': configure: error: C compiler cannot create executables Seeconfig.log’ for more details
make: *** No targets specified and no makefile found. Stop.

Figured it out. My home folder name had a space in it and the compiler doesn’t like that apparently.

1 Like