Rails
From TaxonWorks Wiki
Installing Rails 4.0 on MacOS X
- Get Homebrew.
- Homebrew installs software into /usr/local, so you might need sudo-powers to install it, but -- once installed -- all Homebrew installations shouldn't need sudo at all.
-
brew install ruby
- Since this will install Ruby into /usr/local, OS X's system Ruby (1.8.7) will be untouched.
- Run
ruby --version
to make sure you have Ruby 2.0.
- Add
/usr/local/Cellar/ruby/2.0.0-p0/bin
to your PATH (mine is in~/.bash_profile
). You need to open a new terminal or start a new shell after this.- If you miss this step (like I did), running
rails
will call your system rails (/usr/bin/rails
), which will ask you to install rails using sudo. Don't believe it.
- If you miss this step (like I did), running
-
gem install rails
- If this step works correctly, the
rails
binary will be installed into/usr/local/Cellar/ruby/2.0.0-p0/bin
, so if that's in your path, runningrails -v
will report that you have rails 4.0 installed.
- If this step works correctly, the
- Use
which rails
to make sure your path to therails
binary is correct -- it should *not* be in/usr/bin
!