Trouble downloading Ruby version

I am failing to build Ruby 2.3.1 on my version of Ubuntu that I just set up. Here is my error message:

goose@HP-Spectre-x360-Convertible:~$ rbenv install 2.3.1
Installing ruby-2.3.1…

BUILD FAILED (Ubuntu 18.04 using ruby-build 20180618-5-gad8f3a4)

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

Last 10 log lines:
installing rdoc: /home/goose/.rbenv/versions/2.3.1/share/ri/2.3.0/system
installing capi-docs: /home/goose/.rbenv/versions/2.3.1/share/doc/ruby
The Ruby openssl extension was not compiled.
ERROR: Ruby install aborted due to missing extensions
Try running apt-get install -y libssl-dev to fetch missing dependencies.

Configure options used:
–prefix=/home/goose/.rbenv/versions/2.3.1
LDFLAGS=-L/home/goose/.rbenv/versions/2.3.1/lib
CPPFLAGS=-I/home/goose/.rbenv/versions/2.3.1/include

However, when I install libSSL as directed, I get the same error message when I try to build Ruby.
Any help is appreciated!

Hi ajgosling,

I was helping another student with this problem on slack and we found a great website on how to install Ruby on Ubuntu. Follow the steps on this website for installing: https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-with-rbenv-on-ubuntu-16-04.

Michael

Hi Michael,

I ran through that guide but unfortunately am encountering the exact same problem, where the build is failing due to missing the openSSL extension, but my computer tells me that I have that extension.

You will have to run sudo apt install libssl1.0-dev. Before you do that make sure everything is updated using sudo apt-get update. If you are using rvm, then rvm get head to update rvm.

Thank you Michael, I think I’m all setup!

AJ