Ruby on Rails doesn't quite work on Mac OS X

Ruby on Rails is gaining in popularity when it comes to creating web sites. And no wonder, the features within the framework seems ideal for an agile development process. So naturally, I wanted to try it out on my new Macbook Pro.

Since I wanted control on the installation process, I followed the guide on for OS X. Everything went fine until I got the following error:

dyld: NSLinkModule() error
dyld: Library not loaded: /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib
Referenced from: /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib/mysql.bundle
Reason: image not found

To fix this problem, issue the following command:

sudo install_name_tool -change \
  /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib \
  /usr/local/mysql/lib/libmysqlclient.15.dylib \

With this change I seem to be having a fully working Rails environment.