Installing RMagick Gem
sudo apt-get install imagemagick libmagickwand-dev
gem install rmagick
or
in gem file
gem 'rmagick'
then run
bundle install
use rvm to install ruby (preferred) or use apt-get install ruby ruby-dev
aptitude install build-essential imagemagick libmagickcore-dev libmagickwand-dev
gem install rmagick
--Edit 1--
sudo apt-get install ruby-dev
You will also need ruby-dev (or ruby-full) for successfully compiling the RMagick before gem install.