How to use MAMP with the mysql2 gem and Ruby 1.9.3-p194 via rbenv
Let's say you're a web developer who happens to work with both MAMP and Ruby when building different types of websites. Let's say you also like to keep your MySQL stuff in one place and don't like having to juggle both a local MySQL install as well as a MAMP MySQL install. Well, you can indeed connect your ruby apps to MAMP's MySQL. Here's a tutorial on how to do it.
Important! Before you do anything, download and install MAMP. MAMP Pro will work as well. At the time of this writing, MAMP 2.1.1 is the latest.
First, install Ruby via rbenv
- Install homebrew
- Install rbenv:
brew install rbenv, follow any instructions homebrew gives you after the installation is complete.