Prem of thoughtbot already had some brief instructions about upgrading to mountain lion and then thanks to Kenny for adding much to those instructions.
What follows is my own upgrade path:
- Take backup via Time Machine or superduper!.
- Upgrade using installer from App store and reboot.
- Install XCode 4.4 from App store. Looks like, if you don't care much about developing iOS or OSX applications, you can skip this step. But I didn't.
- Install command line tools of XCode as instructed in Prem's blog post.
- Change permissions of Homebrew directory.
sudo chown -R `whoami` /usr/local brew update
- If you are like me, you still have few applications running on 1.8.7. Ruby versions before 1.9.3 can't be easily compiled using llvm-gcc compiler. Install gcc-4.2 using homebrew:
brew tap homebrew/dupes brew install apple-gcc42
apple-gcc42as default compiler. Update your
~/.bashrcand add following lines:
Above line should take care of compiling ruby itself and many native gems which use proper compiler detection. Unfortunately this won't work for few odd gems and hence, you also need to do:
sudo ln -s /usr/local/bin/gcc-4.2 /usr/bin/gcc-4.2
Install XQuartz. This step may require you to logout and login again.
Even if you already had ruby 1.8.7/1.9.3 compiled, I will urge you to recompile new one - just to ensure everything works perfectly. For compiling Ruby 1.8.7/REE:
export CPPFLAGS="-I/opt/X11/include" export CFLAGS="-I/opt/X11/include"
For compiling ruby:
rvm reinstall ree rvm reinstall 1.9.3
You should be able to compile ruby 1.9.3 without requiring any of above flags.
- Some recommend reinstalling key packages that you have installed using homebrew before ML upgrade.I did not bother to reinstall all the packages, but I did reinstall
brew unlink imagemagick brew install imagemagick
At this point you should have a working ruby and rails setup. I faced a minor problem where I was running mysql using packages downloaded from Mysql website and they were installed in
/usr/localand after I changed permissions to restore Homebrew setup, my Mysql installation broke. To restore the sanity:
sudo chown -R _mysql:_mysql /usr/local/mysql-5.xx
In some of Rails applications, Nokogiri was throwing warning about being compiled against different version of
libxml2. To get rid of those, I simply nuked
Rails.root/vendor/rubyand reinstalled the gems my app was using via
Mark has suggested these instructions for getting
powrunning with Safari 6.
I found that automatic reconnecting to wi-fi after coming out of sleep was broken. To fix this, I removed all the remembered locations and then in
Configure Network Prefrences -> TCP/IPchanged
I also noticed that external monitor when plugged in, won't be detected at all.To fix this I had to reset my PRAM. You can follow this article for more information on resetting PRAM.