RMagick on CentOS
If you use paperclip, this doesn’t really apply to you. Paperclip is a uses a sort of semi-sane approach in that it uses the ImageMagick system calls rather than the -devel API that RMagick plugs into.
Carrierwave on the other hand if you want to do any kind of image processing requires that you use either ImageMagick or ImageScience.
I’ve never bothered trying to use ImageScience, mainly because ImageMagick mostly works everywhere else (on development environments) and I wasn’t about to change everyone’s development preferences in order to solve a deployment issue.
Thankfully – doing so is fairly easy:
On CentOS 5.x you will need to make the following change to /etc/yum.repos.d/CentOS-Base.repo
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
exclude=ImageMagick*
also make sure you remove any already existing imagemagick packages
yum remove ImageMagick ImageMagick-devel
The final step is to add my yum repository. Create /etc/yum.repos.d/Omar.repo and add the following to it:
[Omar]
name = Omars Custom Doom Repository
baseurl = http://yum.omarqureshi.net/CentOS/5/custom/$basearch/
enabled = 1
gpgcheck = 0
and then:
yum install ImageMagick ImageMagick-devel
After that, RMagick should install (so long as the current RMagick works with 6.7.2-9)
“If there are any problems, give me shout on Twitter and I will try to resolve them (@omarqureshi) – I will also try and keep these packages up to date.”