Well, the Rails installer strongly encouraged me to get Homebrew and do all my prerequisite installs that way. All I knew about Homebrew was that it existed. I've already installed a lot of UNIX stuff via MacPorts, which seems to work fine, so I did some quick reading about the differences. They seem to be:
- Installation directory: Homebrew uses usr/lib; MacPorts uses /opt/local.
- Dependency resolution: Homebrew uses existing system installs where possible; MacPorts always installs the latest and greatest version of your dependencies.
- Notions of ownership: Homebrew wants to take over /usr/lib, which is a standard UNIX install location, and set ownership for that folder to a single user to eliminate the need for sudo; MacPorts uses a nonstandard location to avoid interfering with other installs and requires sudo for installation, making installed software available to all users.
- OS upgrade support: Since MacPorts is in its own little world, it's not broken by system updates; since Homebrew installs to /usr/lib and depends on system libraries, it can be.
- Database Management: Homebrew uses git and Sqlite to track installed apps; supposedly this makes it easier to upgrade Homebrew itself. Or something.
- Coolness/Prettiness Factor: Homebrew's website is all pretty and modern and makes everything look simple and seamless.
- Community: Since Homebrew is written in Ruby, all the Ruby fanboys use it and all the Ruby stuff takes for granted that you're going to be using Homebrew. I haven't yet hit any snags where Homebrew had something I needed that MacPorts didn't, but there's a lot of pressure to conform.
After some reading, here were my thoughts:
- MacPorts sounds a lot less problematic, especially when it comes to OS upgrades.
- Having to download less for Homebrew sounds nice for installations at home over a not-super-fast cable internet connection.
- Git and Sqlite are cool, but I guess I don't really care how things are stored so long as the installs are seamless.
- I'm already using MacPorts, and I don't know what happens when I start mixing the systems. I suppose everything's fine so long as I don't install the same package from both, but what about dependencies that get sucked in? Plus, if I use both systems, I have to decide which to use for every package I install.
- While I don't *like* Homebrew's notions of ownership, I'm the only user of my system and I guess I don't care what it does so long as none of my existing stuff breaks and Homebrew does its thing right. The Homebrew page assures you that's how it'll go.
- It would be nice to be doing things the "default" way for all the Ruby stuff.
- I already have stuff in /usr/lib that I've built and installed from source. I *think* Homebrew is supposed to leave that stuff alone so long as you don't try to install the same package via Homebrew. But I wasn't sure.
Upon installing, Homebrew warned me that I was using MacPorts and that I should probably rename, if not delete, my MacPorts install directory. Uh-oh. I hoped this was only necessary if Homebrew and MacPorts installed conflicting versions of the same library, and I was going to keep my Homebrew installs to a minimum, so I proceeded. But the Homebrew installer also encouraged me to run "brew doctor" to list all the potential problems with my system. It complained about all the stuff in /usr/lib and then about some library from my Mono install. And I thought, y'know, this MacPorts-all-in-its-own-world thing is starting to sound pretty nice. So I uninstalled Homebrew using this script, installed the Ruby/Rails dependencies via MacPorts, and went on my merry way.
So. MacPorts for me.