Upgrading your RoR environment for OS X Mavericks
I tend to resist upgrading major pieces of my dev environment in order to maintain stability. Last week, I needed to upgrade the Tire gem (https://github.com/karmi/retire), which led to a cascade of required upgrades:
- Latest version of Tire required Ruby 1.9.3 (I was on 1.9.2).
- Upgrading Ruby with RVM required XCode 5 (I was on 4).
- Latest XCode required the latest OS X (I was on Lion).
- Latest OS X required new Java (I use Java to run Elasticsearch: http://www.elasticsearch.org/).
Here are the steps that were required. Mostly this is a note to self but hopefully will be useful to others that are slow adopters of the latest upgrades.
- Update OS X from the App Store: https://itunes.apple.com/ca/app/os-x-mavericks/id675248567?mt=12
- Update XCode. Login to your Mac Developer account and go to https://developer.apple.com/downloads/index.action. Download and install the latest version of XCode (5.0.1 at time of writing).
- Update Java: http://support.apple.com/kb/DL1572?viewlocale=en_US Thanks to this answer for pointing to the right package: http://stackoverflow.com/a/19535253/363813
- Install Command Line Tools. Download and install "Command Line Tools (OS X Mavericks)" from https://developer.apple.com/downloads/index.action
- Update Ruby with RVM:
$ rvm upgrade 1.9.3-p448
(latest 1.9.x Ruby at time of writing: https://www.ruby-lang.org/en/downloads/)
At the end of this process I had a stable up to date environment that allowed me to follow through on my original intention: to update a gem.
Sometimes even the simple things are hard :)
Written by Johnny Rodgers
Related protips
2 Responses
Had the same experience 2 weeks ago. A lot of projects are jumping to Ruby 1.9.3+ or even to 2.0.0, and also Rails 4. I do not mind the upgrade so much as the hassle of so many undocumented edge cases.
Thanks for the post!
I've posted a follow-up to this tip for machines that are having trouble installing gems with native extensions: https://coderwall.com/p/p1g2kg.