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

Ruby

José Manuel Martínez López
José Manuel Martínez López
18,133 Points

I can´t install ruby.

I´m following the workshop Installing a Ruby on Rails Development Environment in OS X and when I type: rbenv install 2.2.1 I get this message: ruby-build: definition not found: 2.2.1

4 Answers

Hi Jose,

You have to update your homebrew. Let's do this way: brew update && brew upgrade and then rbenv install '2.2.1'

Hope that helps.

-Salman

José Manuel Martínez López
José Manuel Martínez López
18,133 Points

Hi Salman, thanks for reply. I did what you said but I still get the same message.

still same errors? That means, ruby-build has not been updated yet.

Type:

  • brew upgrade ruby-build
  • rbenv install 2.1.0
  • rbenv rehash
  • rbenv shell 2.1.0
  • ruby -v

should work this time.

José Manuel Martínez López
José Manuel Martínez López
18,133 Points

Now I get this message: BUILD FAILED (OS X 10.10.3 using ruby-build 20141028-5-gd22a320)

That seems odd, I'v never had this issue before.

Sorry I have no idea, you can google to find out more. :(

Hi Jose, I had this issue earlier and solved it. However, not all BUILD FAILED errors are the same. What specific information are you getting? Maybe you can post the full error message? In the last 10 lines, ususally reported at the bottom of the error in terminal, you should see some helpful information to get started figuring out what's the problem.

José Manuel Martínez López
José Manuel Martínez López
18,133 Points

Last 10 log lines: Last-Modified: Fri, 23 May 2014 08:33:31 GMT ETag: "9e6386d53f5200a3e7069107405b93f7" Accept-Ranges: bytes Server: AmazonS3 Age: 10680 X-Cache: Hit from cloudfront Via: 1.1 13126fd5e16d6f2a7aa5b0ee5fcda72d.cloudfront.net (CloudFront) X-Amz-Cf-Id: Ic9RIEa37g4Ta3psRNfPeH3TqgX-8_5yNP5q9NGznku1EHaQ7iKAsg==

/var/folders/t1/hqwysspn0513h3_rf_x14b6r0000gn/T/ruby-build.20150517115519.629/ruby-2.1.0 /var/folders/t1/hqwysspn0513h3_rf_x14b6r0000gn/T/ruby-build.20150517115519.629 ~

Is this helpful?

Sorry, Jose, that issue is completely different from the one I had (some fiddle with clang).

Hopefully this will ring a bell with someone here.

Could your system think its ruby version is cached, in the cloud?

What do you get when you type which ruby into your terminal?

What do you get when you type rbenv versions? Is the word system returned?

Finally (and I apologize if none of this leads you to a solution, I'm just guessing) what do you see if you type rbenv install --list? Can you see the version of ruby that you are trying to install?

Hope that's helpful.

How are you getting on with this one?