If you have already added gem 'mysql2' to your Gemfile but get a message saying that it is missing when you try to migrate

Make sure that you have installed libmysql-ruby

sudo apt-get install libmysql-ruby

This one caught me out on the weekend and it took a while to work out what was going on. I am guessing that not having libmysql-ruby installed caused the gem to incorrectly advertise that it was not available. I did not get any errors when installing the mysql2 gem which is strange.

comments powered by Disqus