Can't get Ruby 2.6.3 to install


#1

Hi all,

I tried my best to solve this myself but to no avail. I am trying to install ruby, as per the lesson here: https://www.theodinproject.com/courses/web-development-101/lessons/installing-ruby

however, it’s not working. I keep getting the same error:

ruby-build: use openssl from homebrew /var/folders/4n/wl1209sd0tbb8y0v0jljc9700000gp/T/ruby-build.20190608180447.88718 ~ Downloading ruby-2.6.3.tar.bz2... -> https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.3.tar.bz2 /var/folders/4n/wl1209sd0tbb8y0v0jljc9700000gp/T/ruby-build.20190608180447.88718/ruby-2.6.3 /var/folders/4n/wl1209sd0tbb8y0v0jljc9700000gp/T/ruby-build.20190608180447.88718 ~ Installing ruby-2.6.3... checking for ruby... /usr/bin/ruby tool/config.guess already exists tool/config.sub already exists checking build system type... x86_64-apple-darwin16.7.0 checking host system type... x86_64-apple-darwin16.7.0 checking target system type... x86_64-apple-darwin16.7.0 checking whether the C compiler works... no configure: error: in/var/folders/4n/wl1209sd0tbb8y0v0jljc9700000gp/T/ruby-build.20190608180447.88718/ruby-2.6.3’:
configure: error: C compiler cannot create executables
See `config.log’ for more details
make: *** No targets specified and no makefile found. Stop.

BUILD FAILED (OS X 10.12.6 using ruby-build 20190423)

Inspect or clean up the working tree at /var/folders/4n/wl1209sd0tbb8y0v0jljc9700000gp/T/ruby-build.20190608180447.88718
Results logged to /var/folders/4n/wl1209sd0tbb8y0v0jljc9700000gp/T/ruby-build.20190608180447.88718.log

Last 10 log lines:
tool/config.guess already exists
tool/config.sub already exists
checking build system type… x86_64-apple-darwin16.7.0
checking host system type… x86_64-apple-darwin16.7.0
checking target system type… x86_64-apple-darwin16.7.0
checking whether the C compiler works… no
configure: error: in /var/folders/4n/wl1209sd0tbb8y0v0jljc9700000gp/T/ruby-build.20190608180447.88718/ruby-2.6.3': configure: error: C compiler cannot create executables Seeconfig.log’ for more details
make: *** No targets specified and no makefile found. Stop.`

any ideas what I’m doing wrong? I tried all kinds of things I looked up on google both nothing helps unfortunately.


#2

ok I searched some more and the problem was that my username contained a space. So this I solved and it started installing. After about a minute it’s done and says 2.6.3 installed. however, upon inspection it still says:

Daniels-iMac:~ Daniel$ ruby -v ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]

what am I doing wrong?


#3

You’ve installed xcode and rbenv?


#4

Yeah both are installed. I installed the latest version of xcode that my OS (10.12.6) supports. I read something about needing the latest openssl version, so I upgraded that as well and it’s telling me I have version 1.0.2r, so I think I’m good there. Really no idea why this is not working. Any help would be very much appreciated :slight_smile:


#5

Can you type which ruby in your terminal? The expected output should be something like /Users/username/.rbenv/shims/ruby