I am trying to install refinerycms, a Ruby on Rails CMS on Ubuntu 10.04 LTS. I run rails server and I get the following exception:

carcher@carcher-laptop:~/Code/tgc$ rails server
=> Booting WEBrick
=> Rails 3.0.0 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/usr/lib/ruby/gems/1.8/gems/rmagick-2.12.2/lib/RMagick2.so: This installation of RMagick was configured with ImageMagick 6.6.4 but ImageMagick 6.5.7-8 is in use. (RuntimeError)
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:in `load_dependency'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:591:in `new_constants_in'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:in `load_dependency'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in `require'
from /usr/lib/ruby/gems/1.8/gems/rmagick-2.12.2/lib/RMagick.rb:11
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:in `load_dependency'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:591:in `new_constants_in'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:in `load_dependency'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in `require'
from /usr/lib/ruby/gems/1.8/gems/dragonfly-0.7.6/lib/dragonfly/analysis/r_magick_analyser.rb:1
from /usr/lib/ruby/gems/1.8/gems/dragonfly-0.7.6/lib/dragonfly/config/r_magick.rb:15:in `apply_configuration'
from /usr/lib/ruby/gems/1.8/gems/dragonfly-0.7.6/lib/dragonfly/configurable.rb:33:in `configure'
from /usr/lib/ruby/gems/1.8/gems/dragonfly-0.7.6/lib/dragonfly/config/r_magick.rb:14:in `apply_configuration'
from /usr/lib/ruby/gems/1.8/gems/dragonfly-0.7.6/lib/dragonfly/configurable.rb:39:in `configure_with'
from /usr/lib/ruby/gems/1.8/gems/refinerycms-0.9.8.2/vendor/refinerycms/images/lib/images.rb:10
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/initializable.rb:25:in `instance_exec'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/initializable.rb:25:in `run'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/initializable.rb:50:in `run_initializers'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/initializable.rb:49:in `each'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/initializable.rb:49:in `run_initializers'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/application.rb:134:in `initialize!'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/application.rb:77:in `send'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/application.rb:77:in `method_missing'
from /home/carcher/Code/tgc/config/environment.rb:5
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:in `load_dependency'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:591:in `new_constants_in'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:in `load_dependency'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in `require'
from /home/carcher/Code/tgc/config.ru:3
from /usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval'
from /usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize'
from /home/carcher/Code/tgc/config.ru:1:in `new'
from /home/carcher/Code/tgc/config.ru:1
carcher@carcher-laptop:~/Code/tgc$

I built and installed ImageMagick 6.6.4 from source following the instructions here and BEFORE I did that I removed the ImageMagick tools that were pre-installed in Ubuntu, to avoid any conflicts. But still I seem to have this version 6.5.7 around.

Is it possible the version number just exists in a config file somehwere? Also, did you apt-get purge imagemagick or just apt-get remove?
–
tj111Sep 14 '10 at 19:28

I removed it via the Ubuntu Software Center, not through the shell. In fact if I run sudo apt-get purge imagemagick now it tells me it's not installed! I did install it though from source as I mentioned. How can I find and purge that?
–
Ciaran ArcherSep 14 '10 at 22:19

2 Answers
2

It's likely you installed imagemagick 6.5.7 to /usr/local, if you can't find it in your package listing.

Try which convert to see where imagemagick binaries are located. (convert is one of the utilities shipped with imagemagick.) Also try convert --version to see which version is active. If you get a different version than what Ruby/Rails is seeing, check your project configuration to make sure you don't have any extra paths it may be looking in. Also, be sure that imagemagick wasn't installed to your Rails app directory; I think it may try to include things there as well.

No joy - convert --version returns 6.5.7, and no sign of problems with the project files. Gonna try a clean install I think.
–
Ciaran ArcherSep 15 '10 at 18:41

In that case, try installing the version in the archives (aptitude install --reinstall imagemagick) and then remove it again. That should clean it out, I think, depending on where it's located. Was it in /usr/bin/convert when running which convert?
–
Jacob PeddicordSep 15 '10 at 19:04