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

后端 未结 11 1765
悲哀的现实
悲哀的现实 2021-02-01 08:42

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 wh

11条回答
  •  醉话见心
    2021-02-01 09:27

    Use RVM http://rvm.io or rbenv to install newer Rails versions than what come pre-installed with OS X.

    Follow examples on the site https://rvm.io/rvm/install/ but basically:

    Install RVM: $ \curl -L https://get.rvm.io | bash -s stable

    You can then $rvm list known to see what Rubies are available to you (lots). And simply $rvm install 1.9.3 to get the most current version of Ruby (which as of this writing is ruby-1.9.3-p327)

    Set that ruby as your default $rvm --default use 1.9.3

    Create a default gemset to store your gems $rvm use 1.9.3@mygemset --create --default

    Then install Rails $ gem install rails will get you current which today is same as typing gem install rails -v 3.2.9

提交回复
热议问题