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

Natasha McDiarmid
Natasha McDiarmid
11,400 Points

How Do I Update Ruby?

I currently have Ruby 2.0.0p481 which is out of date with the current 2.2.2. I want to update it but I don't know how.

Here's what I've tried:

brew install ruby

Which outputted:

brew: command not found

And I've tried:

rbenv install 2.2.2

Which outputted:

no such command

I'm on a Mac – Yosemite.

3 Answers

You should have just needed to install homebrew with that first snipit it tells you to copy and paste into your terminal. After that you can use "brew install ruby" to install ruby and you can use "ruby -v" to check what version you have installed.

This link should get you going. http://brew.sh/ Any other questions I am happy to help.

Natasha McDiarmid
Natasha McDiarmid
11,400 Points

I got as far as this line:

brew edit wget

And it outputted:

Warning: Using edit because no editor was set in the environment.
This may change in the future, so we recommend setting EDITOR, VISUAL,
or HOMEBREW_EDITOR to your preferred text editor.
edit: error: -10814

So I tried:

brew install ruby

and it says ruby-2.2.2 is installed, but when I do:

ruby -v

It tells me it's version 2.0.0