Are you sure it's libmagic and not imagemagick? The failure I am getting trying to bundle install is:

Can't install RMagick 2.13.2. Can't find Magick-config in /usr/local/bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

Also, shouldn't brew install be before bundle install?

Thanks :)