Rmagic install Problem on linux/Ubuntu

sudo apt-get install build-essential ruby-1.8dev

Should fix it.