Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Installing a Ruby Development Environment Installing a Ruby Development Environment Installing Ruby on Mac

rbenv ruby installation fail ubuntu

here is the error log

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 20141225-7-g4aeeac2)

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

Last 10 log lines: compiling ossl_x509store.c compiling ossl_engine.c compiling ossl_ocsp.c compiling ossl_config.c compiling ossl_digest.c installing default openssl libraries linking shared-object openssl.so make[2]: Leaving directory /tmp/ruby-build.20150106233051.25615/ruby-2.2.0/ext/openssl' make[1]: Leaving directory/tmp/ruby-build.20150106233051.25615/ruby-2.2.0' make: *** [build-ext] Error 2

not sure what to do as I am a complete noob to git let alone rbenv...

2 Answers

Ricky Catron
Ricky Catron
13,023 Points

After a quick google of "BUILD FAILED (Ubuntu 14.04 using ruby-build 20141225-7-g4aeeac2)" I found this solution.

sudo apt-get install autoconf bison libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev  

It takes quite a while to get used to understand Ubuntu error messages so I usually throw it into google. The community is so large someone has done it before.

This is the site i found the solution on. I hope it works for you!

Goodluck! --Ricky

Ricky, thank you. It installed the files but when I do ruby -v it still shows the old version.

Ricky Catron
Ricky Catron
13,023 Points

I found this stack overflow question that might help.

You are probably going to need to modify some environment variables to make it work.

Here is the documentation. I think this part will be the most help.

Goodluck! --Ricky

Hi, Jonathan:

I strongly recommend running Thoughtbot's Laptop script. I've used it to set up rubyenv painlessly on new Ubuntu and Mac OS installations frequently.

I also suggest trying out linux-homebrew to install such common things alternatively, though apt-get works just fine out-of-the-box for most things.