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 Installing a Ruby Development Environment Installing a Ruby Development Environment Installing Ruby on Mac

When I set "rbenv global 2.1.2" and type in "ruby -v" the incorrect version of ruby shows.

$ rbenv install 2.1.2 Downloading openssl-1.0.1h.tar.gz... -> http://dqw8nmjcqpjn7.cloudfront.net/9d1c8a9836aa63e2c6adb684186cbd4371c9e9dcc01d6e3bb447abf2d4d3d093 Installing openssl-1.0.1h... Installed openssl-1.0.1h to /Users/Leung/.rbenv/versions/2.1.2

Downloading ruby-2.1.2.tar.gz... -> http://dqw8nmjcqpjn7.cloudfront.net/f22a6447811a81f3c808d1c2a5ce3b5f5f0955c68c9a749182feb425589e6635 Installing ruby-2.1.2... Installed ruby-2.1.2 to /Users/Leung/.rbenv/versions/2.1.2

$ rbenv global 2.1.2 $ ruby -v ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin13]

3 Answers

Did you restart your terminal session? Is a ruby version specified in the gemfile of current directory?

I'm having the same problem even after I restarted my terminal.

I restarted the terminal, and it's working fine now! Thanks!