Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing ruby RMagick gem on Ubuntu server without installing X

I would like to use the RMagick gem on an Ubuntu 10.04 server. This is easy to do system-wide using the Ubuntu package librmagick-ruby1.8, but I would like to install the gem in a private location using gem install (or Bundler). Unfortunately, this results in the error

Failed to build gem native extension.

unless the package libmagickcore-dev is installed. A Google or Stackoverflow search for "rmagick ubuntu" leads to lots of people suggesting installing various packages that result in this one getting installed. The problem with this solution is that installing that package also brings in the entire X Windows System as a dependency, which is obviously not desirable on a server.

This should be a common problem. So I am wondering whether anyone has found a solution that does not require X. Thanks for your help!

like image 831
pdg137 Avatar asked Nov 05 '22 18:11

pdg137


1 Answers

The only solution I have so far is to install Imagemagick from source into /usr/local. After doing this, the RMagick gem installs correctly. This is unfortunate, however, since Imagemagick is somewhat difficult to compile, and also then ends up outside of the Ubuntu package management system and is hard to keep up-to-date.

like image 111
pdg137 Avatar answered Nov 07 '22 07:11

pdg137