I’ve gotten this error after i’ve installed ImageMagick (from source) and RMagick (using gem) on my Debian system

libMagickCore.so.2: cannot open shared object file: No such file or directory – /usr/lib/ruby/gems/1.8/gems/rmagick-2.8.0/lib/RMagick2.so

To get rid of this error i executed

ldconfig /usr/local/lib