RSS Feed

Working @GitHub Support, programming for fun, working remotely, love cooking and food, and want to learn how to play the guitar.

MySQL gem doesn't work after upgrading Ubuntu

Published on 2010-05-06

I upgraded Ubuntu 9.10 to 10.04. Everything was cool. I tried to work on a Rails project I am involved by issuing the command rake db:migrate to update the database.

I was getting the following error:

  Error: uninitialized constant MysqlCompat::MysqlRes

Then I uninstalled the mysql gem and tried to install it again only to get the following error:

  Building native extensions. This could take a while... 
  ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError) 
  ERROR: Failed to build gem native extension. 

Then I issued the following command:

  sudo apt-get install libmysqlclient-dev

and then installed mysql gem and it installed with no problems. Finally, rake db:migrate worked again.



blog comments powered by Disqus