25

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?

Penny Liu
  • 15,447
  • 5
  • 79
  • 98
pravin
  • 1,106
  • 1
  • 18
  • 27
  • I am experiencing the same issue. Same version of Ubuntu with the same version of Ruby. It just hangs after it is says `Installing ruby-2.1.2...`. I am using [this gist](https://gist.github.com/JamesDullaghan/5941259) to setup the server and am experiencing the problem using rbenv instead of RVM. – Matt Jun 11 '14 at 14:26

3 Answers3

42

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.

Scot Bernard
  • 611
  • 6
  • 5
7

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.

vvvvv
  • 25,404
  • 19
  • 49
  • 81
Matt
  • 381
  • 4
  • 13
  • 2
    I gave up on rbenv and started using rvm. It worked like a breeze. So Im not sure if that was the problem – pravin Jul 28 '14 at 14:25
  • 1
    Might as well check this ruby-build ticket for more information: https://github.com/sstephenson/ruby-build/issues/526 – Wen Aug 06 '14 at 09:13
1

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

lboix
  • 969
  • 12
  • 14