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 on Rails Development Environment in OS X

Michel Frechette
Michel Frechette
10,551 Points

When I run $ rails new testapp -bash: /usr/local/bin/rails: /usr/local/opt/ruby/bin/ruby: bad interpreter: No such file

command: $ xcode-select version returns: 2343. command: $ rbenv version returns: rbenv 1.0.0 command: $ rbenv global 2.2.1 setup rbenv to *2.2.1 command: $ ruby -v returns: 2.2.1p85 Okay so far... command: $ gem install rails returned: Successfully installed rails-4.2.6 command: $ rbenv rehash --after every command

command: $ rails new testapp returns: -bash: /usr/local/bin/rails: /usr/local/opt/ruby/bin/ruby: bad interpreter: No such file or directory

Houston, I think I have a problem. command: $ git --version returns: git version 2.5.4

What might be going on and can I recover from such a fall?

command: $ gem server url localhost:8808 I see 3 versions of rails there: 4.2.4, 4.2.5, 4.2.6

How do I resolve this?