Setup GEM on your machine:
When you try to install packages with gem, most of the time it does not work due to the wrong setup. Always do it completely:
sajan@test10:~$ sudo gem install mysql
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
extconf.rb:5:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:5
Gem files will remain installed in /var/lib/gems/1.8/gems/mysql-2.9.0 for inspection.
Results logged to /var/lib/gems/1.8/gems/mysql-2.9.0/ext/mysql_api/gem_make.out
What are the packages needed:
1. sudo apt-get install ruby
2. sudo apt-get install rubygems<LateVersion>
3. sudo apt-get install ruby<version>-dev
Things should work now. Enjoy!