This is my config:
rails 2.3.5
ruby 1.8.7
gem 1.8.11
mamp 2.0.3 (which uses Mysql 5.5)
When creating a new rails project with mysql as the database, I get an error:

An error occured while installing mysql2 (0.3.7),andBundler cannot continue.
Make sure that `gem install mysql2 -v '0.3.7'` succeeds before bundling.
I believe this is because gems can't find the MAMP mysql files. So a tutorial says I should download the MAMP libraries and compile it without server so I can then point the gem to those files. The problem is that all tutorials use ./configure which no longer works for Mysql 5.5, instead you have to use cmake. This tutorial: http://blog.mirotin.net/35/mamp-1-9-...nd-ruby-mysql2 mentions a way to do it using cmake, but this command fails for me:

sudo port install cmake
can't find command port. So I tried with homebrew sudo brew install cmake which gives:

Cowardly refusing to `sudo brew install'
So... What are my options? Rails and rubygems all seem to work, it's just pointing it to the MAMP mysql libraries that I'm having a problem with, I'm very new to rails (started yesterday). Any help would be appreciated.