I’ve just installed the GM (Gold Master) version of Mavericks, Apple’s latest OSX operating system. After my other popular blog post on setting up a Ruby on Rails development environment on Mountain Lion, here is my post on setting it up for Mavericks.
Mavericks comes with Ruby 2.0 out of the box but some of my Rails apps are built using 1.9.3. Also, I use RVM because of its gemset feature.
xcode-select --install. This will trigger a popup. Click on install and it will download & install the tools.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install"
brew doctorto check that Homebrew is installed correctly. It currently shows on mine that 10.9 is pre-release and not supported.
brew install apple-gcc42and
sudo ln -s /usr/local/bin/gcc-4.2 /usr/bin/gcc-4.2
curl -L https://get.rvm.io | bash -s stable --autolibs=enabled
source $HOME/.rvm/scripts/rvmafter (replacing YOUR-USERNAME with the username of your machine)
rvm install 2.1.0
rvm install 2.0.0
rvm install 1.9.3
rvm use 2.0.0 --default
gem install rails bundler --no-ri --no-rdoc
curl get.pow.cx | sh
bash <(curl -Ls http://git.io/eUx7rg )
That’s it. You should now have a fully functional Rails development environment setup.