Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Ruby using rbenv on Ubuntu 14.04 virtualbox hangs

Tags:

I'm trying to get the Ruby on Rails running on Ubuntu 14.04. The Ubuntu is installed on VirtualBox. I'm following https://gorails.com/setup/ubuntu/14.04

When I run the command

rbenv install 2.1.2 

Ruby keeps installing forever. I waited for more than 1 hour.

This is how the command-line looks:

rbenv install 2.1.2Downloading ruby-2.1.2.tar.gz... -> http://dqw8nmjcqpjn7.cloudfront.net/f22a6447811a81f3c808d1c2a5ce3b5f5f0955c68c9a749182feb425589e6635 Installing ruby-2.1.2... 

Any suggestion?

like image 709
pravin Avatar asked May 29 '14 23:05

pravin


People also ask

How long does Rbenv install take?

Same thing here running rbenv install 2.1. 9 , it took 5-6 minutes to finish.

What is Rbenv in Ruby?

rbenv is included in all installations of Bitnami Ruby stack that use system packages. It is a command-line tool which allows you to easily install, manage, and work with multiple Ruby environments. Every installed Ruby interpreter using rbenv is isolated in its own directory with its libraries and gems.


2 Answers

I thought the installation where frozen in the same point, but it just takes a long time to complete (1 hour and still running). To see the installation progress add the verbose modifier to the command:

~$rbenv install --verbose 2.1.2 

Note: I followed the Deploy Ruby on Rails instructions for Ubuntu 14.04.

like image 53
Scot Bernard Avatar answered Nov 08 '22 16:11

Scot Bernard


I found a solution that worked for me.

After about 20 minutes of it hanging this error popped up (some of the details cut out):

BUILD FAILED (some extra details...) The Ruby openssl extension was not compiled. Missing the OpenSSL lib?

I then found and followed the answer in this blog post. It directs you to enter this command on the command line sudo apt-get install libssl-dev. After installing libssl-dev (extra details about it in the blog post) I was able to successfully install Ruby 2.1.2.

like image 33
Matt Avatar answered Nov 08 '22 16:11

Matt