-2

I am trying to install the ruby version 2.3.5 in my mac OS environment which is Mojave. I am getting the following issues. Appreciate If anyone can help me to sort out the issue ?

ERROR: Ruby install aborted due to missing extensions
Configure options used:
  --prefix=/Users/efutures/.rbenv/versions/2.3.5
  --with-openssl-dir=/usr/local/opt/openssl@1.1
  --with-readline-dir=/usr/local/opt/readline
  CC=clang
  CFLAGS= -O3 -Wno-error=shorten-64-to-32 
  LDFLAGS=-L/Users/efutures/.rbenv/versions/2.3.5/lib 
  CPPFLAGS=-I/Users/efutures/.rbenv/versions/2.3.5/include 

I tried the following command.

rbenv install 2.3.5
lurker
  • 56,987
  • 9
  • 69
  • 103
  • 1
    Exactly how are you trying to install it? By what command(s)? Are there online steps you are following? If so, what are they? It appears you are also using `rbenv`? – lurker Oct 15 '19 at 10:30
  • Yes I was following the below article. https://gorails.com/setup/osx/10.14-mojave I was trying with the following command as well. rbenv install 2.3.5 – Ruchira Bandara Oct 15 '19 at 10:33
  • It would help if you showed exactly what you entered at the command line in your question. Just the error out of context is less clear. There's an [edit](https://stackoverflow.com/posts/58392508/edit) link below your question. – lurker Oct 15 '19 at 11:02
  • I updated my question with the command I tried in the console. – Ruchira Bandara Oct 15 '19 at 12:04

2 Answers2

0

Found an issue in rbenv repo which suggests that you need an extension to get rbenv to properly work.

Follow the instruction here to install and get rbenv to work properly.

mayorsanmayor
  • 2,870
  • 4
  • 24
  • 44
0

rbenv is a ruby manager. It builds different ruby from source. To make it work, you need to install rbenv and rbenv-build.

brew install rbenv rbenv-build

Secondly, you need to install dependencies readline and openssl@1.1.

brew install realine openssl@1.1

The error missing extensions is related to ruby-build, you may forget to install it or the dependencies.

Simba
  • 23,537
  • 7
  • 64
  • 76