Installing Bundle Mysql

installing bundle mysql fails in ubuntu

http://stackoverflow.com/questions/8874513/installing-mysql2-gem-for-ruby-on-rails-3-1-0

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

sudo apt-get install libmysql-ruby libmysqlclient-dev