Mac OS X Mountain Lion "Rails is not currently installed on this system."

botbot picture botbot · Dec 4, 2012 · Viewed 13.9k times · Source

I am on a fresh install of OS X Mountain Lion. I have installed rails via:

sudo gem install rails

Everything seems to install correctly, but when I type the rails command (rails s, rails -v, etc), I get this error:

Rails is not currently installed on this system. To get the latest version, simply type:

    $ sudo gem install rails

You can then rerun your "rails" command.

The result of 'which rails' is /usr/bin/rails

I thought it was a path issue, and perhaps it is, but I can see that /usr/bin is part of my PATH.

Any help? Thanks!

UPDATE: I noticed everything on my other mac with same exact OS works pretty well... I just can't remember how I got it to work that way. If I run 'which rails' I see it's in a totally different place /Users/username/.rvm/gems/ruby-1.9.3-p194/bin/rails

Answer

jazzyfresh picture jazzyfresh · Jul 16, 2013

If you're using rbenv, don't forget to rbenv rehash after installing/updating ruby.