Showing posts with label rails. Show all posts
Showing posts with label rails. Show all posts

Wednesday, 26 February 2014

Rmagick failing to build on Arch due to HDRI Imagemagick

One of my personal Rails projects uses uses the rmagick gem.  On Arch Linux the imagemagick package from the Extra repository is built with the --enable-hdri option.  This will cause the gem to fail when installing.



Not to worry.  I found this bug and this patch.  But it was AUR to the rescue with the package imagemagick-no-hdri.

So remove the initial package with:

    pacman -Rs imagemagick

Next install the other package with your favourite method - I use aurget (you may need --deps).

    aurget-S imagemagick-no-hdri

Now install your rmagick gem.



Success!

Sunday, 2 February 2014

Installing Rmagick Gem on Arch Linux using ABS

Installing my Rails project to a newly installed Arch Linux laptop - I ran bundle install and got the following error:



I sync'd ABS and then copied the /var/abs/extra/imagemagick/ folder to a working folder.

Now edit PKGBULD, removing the --enable-hdri option so the .configure section looks like this:



Run makepkg  in the working folder and then install the resultant package with pacman -U.

Finally, back in my Rails project folder, I ran bundle install (or I could have run gem install rmagick) once again and the Rmagick gem installs!