Rails, RMagick, and Linux
Jul 29
Since I’ve been playing around with RMagick on OS X I decided to go through the motions of installing it on my Linux server. This is necessary since my Rails apps are deployed to this server. I found a good set of installation instructions on this page that I followed step by step.
Everything compiled and installed successfully until I got to Step 3. No matter what I tried I received the following error message:
/home/dennis/programs/RMagick-1.13.0/./ext/RMagick/RMagick.so: libMagick.so.10: cannot open shared object file: No such file or directory – /home/dennis/programs/RMagick-1.13.0/./ext/RMagick/RMagick.so (LoadError)
from /home/dennis/programs/RMagick-1.13.0/./lib/RMagick.rb:11
I was certain that libMagick.so.10 existed /usr/local/lib, but wasn’t sure how to get RMagick to recognize it. Luckily after an hour or so I decided to see what the README file had to say. It turns out there’s a variable that can be exported to solve the path problem. Just run this command:
export LD_LIBRARY_PATH=/usr/local/lib
This solved my problem and I was able to successfully compile and install RMagick. It’s amazing the amount of time and frustration saved when you actually read the directions.
