When bundle install leads to error such as "An error occurred while installing mysql2 (0.3.16), and Bundler cannot continue."

 When you run bundle install, but occurs error such as:
An error occurred while installing mysql2 (0.3.16), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.3.16'` succeeds before bundling.
 
then run this command and everything will be okay :)

sudo apt-get install mysql-client libmysqlclient-dev

Comments