Mysql Not Installing - Trying to Use it with RoR

I'm following the guides in a Lynda program teaching Ruby on Rails.

The guy suggests using mysql instead of using the default mysqlite3.

I ran this:

 rails new simple_cms -d mysql 

and this is part of the error

An error occured while installing mysql2 (0.3.11), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.3.11'` succeeds before bundling.

Solution 1:

There are many people asking this question already. If you are using linux,

sudo apt-get install libmysqlclient-dev

If you are using mac, use homebrew

brew install mysql

then run gem install mysql2