1.  sudo apt-get install p_w_picpathmagick
2.  sudo apt-get install libmagick9-dev
3.  sudo gem install rmagick