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 Ruby Foundations Ruby Basics Installing Ruby

julian gallegos
PLUS
julian gallegos
Courses Plus Student 1,361 Points

installing ruby on mac

i'm having trouble following along and installing ruby on my mac.

I currently have ox x 10.9.2 on my computer.

Every time I try to go to github and download the osx-gcc installer, my computer keeps telling me that the file cannot be found or that I don't have access to the file i downloaded.

i went ahead and downloaded Xcode and also went to the developer site and downloaded command line osx for mountain lion.

is this essentially the same thing?

Thanks for the help!

4 Answers

Jimmy Hsu
Jimmy Hsu
6,511 Points

Ruby should already be installed with OSX by default.

Enter terminal and type

$ruby -v

to find which version you have.

The default version is 1.9.3 or something close to that, which is outdated.

Update to the latest ruby, which should be 2.1.1 though rbenv. rbenv helps you manage the different versions of ruby you may have for different projects.

For example, you may need a certain set of gems or different version of ruby for your local/project enviornment, but you use a different set of tools for your global/default ruby/different project. https://github.com/sstephenson/rbenv

julian gallegos
PLUS
julian gallegos
Courses Plus Student 1,361 Points

i just entering it on the terminal and it says command not found.

is there another step i missed?

Thanks!

julian gallegos
PLUS
julian gallegos
Courses Plus Student 1,361 Points

i downloaded Xcode and also installed rvm.

Is there another step that i need to do to install ruby onto my computer?

Thanks!

julian gallegos
PLUS
julian gallegos
Courses Plus Student 1,361 Points

actually, i think it's on my comp now but i'm not sure how.

i type "ruby -v" into the terminal and then got this output:

$ ruby -v ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin13] julians-MacBook-Pro:~ juliangallegos$

does this mean it's already installed?

Thanks!