6

Trying to Setup Ruby On Rails on Ubuntu 14.04 Trusty Tahr

The console error ouput:

rbenv install 2.2.0
Downloading ruby-2.2.0.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/7671e394abfb5d262fbcd3b27a71bf78737c7e9347fa21c39e58b0bb9c4840fc
Installing ruby-2.2.0...

BUILD FAILED (Ubuntu 14.04 using ruby-build 20150112)

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

Last 10 log lines:
compiling ossl_digest.c
compiling ossl_x509name.c
compiling ossl_bio.c
compiling ossl_config.c
compiling ossl_asn1.c
installing default openssl libraries
linking shared-object openssl.so
make[2]: Leaving directory `/tmp/ruby-build.20150113142305.19357/ruby-2.2.0/ext/openssl'
make[1]: Leaving directory `/tmp/ruby-build.20150113142305.19357/ruby-2.2.0'
make: *** [build-ext] Error 2

Log file ruby-build.20150113142305.19357.log.

4 Answers 4

15

Ruby 2.2.0 requires the devel version of libffi, so this should help:

sudo apt-get install libffi-dev

0
0

I tried answer of Tomáš Dundáček but it did not work for me I have to install following to make it work

sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6 libreadline6-dev zlib1g zlib1g-dev
0

Just as a side note: I had this problem with rbenv install 2.2.1 (and installing libffi-dev solved it) but not with the 2.2.2 version which is now out. You should use the last hotfix version anyway, so that could solve the problem. I'm interested to know if I'm the only one to had the problem with 2.2.1 and not 2.2.2.

0

Thought I'd add this here since the error is the same, but the cause is different (OpenSSL). The only thing that worked (after a few hours of trying a bunch of things) was uninstalling an old version of OpenSSL with homebrew.

Not the answer you're looking for? Browse other questions tagged or ask your own question.