Software installation – install Ruby 2.3.1 – Ubuntu 19.10 – Build failed

I am new to the Ubuntu and Ruby installation and the Linux installation in general.

I get the following issue when I try to install Ruby 2.3.1 via rbenv. Any idea why that could be? Many thanks.

prem@chinz:~$ rbenv install 2.3.1
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 (Ubuntu 19.10 using ruby-build 20191124-2-g77e949a)

Inspect or clean up the working tree at /tmp/ruby-build.20191205111801.21317.gjqU1A
Results logged to /tmp/ruby-build.20191205111801.21317.log

Last 10 log lines:
make(1): *** (exts.mk:208: ext/openssl/all) Error 2
make(1): *** Waiting for unfinished jobs....
linking shared-object objspace.so
make(2): Leaving directory '/tmp/ruby-build.20191205111801.21317.gjqU1A/ruby-2.3.1/ext/objspace'
linking shared-object date_core.so
make(2): Leaving directory '/tmp/ruby-build.20191205111801.21317.gjqU1A/ruby-2.3.1/ext/date'
linking shared-object nkf.so
make(2): Leaving directory '/tmp/ruby-build.20191205111801.21317.gjqU1A/ruby-2.3.1/ext/nkf'
make(1): Leaving directory '/tmp/ruby-build.20191205111801.21317.gjqU1A/ruby-2.3.1'
make: *** (uncommon.mk:203: build-ext) Error 2