RMagick.so pain

17 Sep

We are using rmagic 1.15.11 gem which is inside our source tree.

On CentOS i had installed:
rpm -qa | grep -i magick

But when i tried to run mongrel I got:

#<noMethodError: undefined method `configuration' for #>
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- RMagick.so (MissingSourceFile)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from /home/jtsoong/chipmeup/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:509:in `require'
from /home/jtsoong/chipmeup/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:354:in `new_constants_in'

I then downloaded the tar ball of ImageMagick (the same version 6.4.3-6) and installed that (straight ./configure; make; make install)

I then got this error:
/usr/lib/ruby/gems/1.8/gems/rmagick-2.6.0/lib/RMagick.so: /usr/lib/ruby/gems/1.8/gems/rmagick-2.6.0/lib/RMagick.so: undefined symbol: Init_RMagick - /usr/lib/ruby/gems/1.8/gems/rmagick-2.6.0/lib/RMagick.so (LoadError)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'
from /home/jtsoong/chipmeup/vendor/rails/activerecord/lib/../../activesupport/lib/act

To fix this I linked in the new RMagick.so (in actual fact the new gem had created RMagick2.so):

sudo ln -s /usr/lib/RMagick.so /usr/lib/ruby/gems/1.8/gems/rmagick-2.6.0/lib/RMagick.so

A gem list shows the gem installed:

rmagick (2.6.0)

This now works, but is an ugly hack..


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: