I recently set up a new MacBook Pro for development. Here’s what I did, mostly as notes to myself for next time:
Basic rails environment
I mostly followed Robby Russell’s guide, here.
That got xcode, macports, ruby and rails, mongrel and postgres installed.
Most of my projects use MySql instead of postgres. I installed Mysql from the binary on the mysql site, not through macports. The download link is here. For a new MacBook, I used the x86-64 package. Also install the startup item, which is included in the package.
Installing the mysql gem requires some path trickery, since I didn’t install the macports version. I followed these instructions, which worked well:
sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
To get the databases copied over with minimal effort, I just copied the /usr/local/mysql/data dir from my old machine to the new one.
Most of my projects are now on git. Following the githubs, I installed it via macports. I included subversion, for those that still use it:
sudo port install git-core +svn
Also gitx, which I’ve come to like; installs with a dmg.
At this point, it’s time to get the gem dependencies for projects installed. You should be able to clone a project and do
sudo rake gems:install sudo rake gems:install RAILS_ENV=test
to get them installed.
Having installed gems using the above, the groovy nokogiri started complaining that it was built against 1.7.3 but was loaded with 1.7.6, or something. This post, which is the best-titled post ever, fixed it.
Not strictly related to development, but a question that came up for me setting up the new machine: How do I give it a good name?
After all of the above, you should have a working environment for coding and running rails apps. There are several other tools I’ve come to rely on; here’s a few:
- The adobe suite, especially photoshop
- xScope, a fantastic layout toolbox
- SequelPro, a mysql client. This is handy for accessing databases via ssh tunnels.
- Firefox, with pixel perfect, web developer toolbar, and firebug, found here
- OmniWeb, OmniFocus, and OmniOutliner Pro, from the omni group
- For irc, colloquy or lime chat
- I use DevonThink Pro Office for a kind of brian trust, but not as deeply as I might;
- For time tracking and invoices, Billings
- Some kind of virtualization, for testing in windows and IE. I’ve been using parallels, but am trying VMWare Fusion. I’ve also heard good things about Sun’s VirtualBox.
- Pathfinder for finder goodness
- I’m using Jolly’s Fast VNC for accessing my old machine remotely, via ssh
- And, stepping out of my dev hat, Movie Magic Screenwriter, iWork, and the fantastic Scrivener