ImageMagick conflict on Ubuntu running 'rails server'

65 views
Skip to first unread message

Ciaran Archer

unread,
Sep 15, 2010, 8:14:28 AM9/15/10
to Refinery CMS
Hi all

I'm looking to use RefineryCMS on Ubuntu 10.04 LTS. Installing
ImageMagick and RMagick has broken my spirit, and I'm posting here for
help :)

I've got to the stage where I removed the bundled version of
ImageMagick on via the Ubuntu Software Manager. I then built and
installed ImageMagick 6.6.4 from source - this worked. I then
installed the packages 'imagemagick' and 'libmagickwand-dev' and then
I was able to install RMagick.

I can then run 'refinerycms ./myproject' but when I change into the
directory and try and run 'rails server' I get the following error:

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 seem to have an older version of ImageMagick in use. Is this the
issue? If so how can I purge the older version? Is that really the
issue?

I'm new to RoR and Ubuntu so go easy on me - but any and all help is
greatly appreciated!

Cheers,
Ciaran

Vladimir Krylov

unread,
Sep 15, 2010, 4:50:56 PM9/15/10
to refine...@googlegroups.com
you problem is written here: "ImageMagick 6.6.4 but ImageMagick 6.5.7-8 is in use."

2010/9/15 Ciaran Archer <ciaran...@gmail.com>
--
You received this message because you are subscribed to the Google
Groups "Refinery CMS" group.
To post to this group, send email to refine...@googlegroups.com
To unsubscribe from this group, send email to
refinery-cms...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/refinery-cms?hl=en

http://www.refinerycms.com



--
Vladimir Krylov
http://cyprus-city.com

Ciaran Archer

unread,
Sep 15, 2010, 5:09:04 PM9/15/10
to Refinery CMS
Thanks but I know that. I'm asking for help on how to to ensure the
I'm only using the newer version.

It seems that installing ImageMagick and RMagic is a real source of
problems for those trying to use refinerycms. Granted, I'm not expert
on Linux but I have been at this for hours.

Today I tried a clean install, installed ImageMagick from source,
confirmed it is working OK (/usr/local/bin/convert --version gives me
v 6.6.4-2), but when I attempt to install the RMagic gem I get the
following error:


ciaran@ciaran-laptop:~$ sudo gem install rmagick
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:1
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/
rmagick-2.13.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/rmagick-2.13.1/ext/
RMagick/gem_make.out

Have I managed to install ImageMagick someplace that the gem cannot
see it? Perhaps, if this is the case, someone might tell me where I
should install it and I can try again. Or perhaps there is some way to
make the gem see it.

Thanks in advance.
Ciaran


On Sep 15, 9:50 pm, Vladimir Krylov <s6nu...@gmail.com> wrote:
> you problem is written here: "ImageMagick 6.6.4 but ImageMagick 6.5.7-8 is
> in use."
>
> 2010/9/15 Ciaran Archer <ciaran.arc...@gmail.com>
>
>
>
> > Hi all
>
> > I'm looking to use RefineryCMS on Ubuntu 10.04 LTS. Installing
> > ImageMagick and RMagick has broken my spirit, and I'm posting here for
> > help :)
>
> > I've got to the stage where I removed the bundled version of
> > ImageMagick on via the Ubuntu Software Manager. I then built and
> > installed ImageMagick 6.6.4 from source - this worked. I then
> > installed the packages 'imagemagick' and 'libmagickwand-dev' and then
> > I was able to install RMagick.
>
> > I can then run 'refinerycms ./myproject' but when I change into the
> > directory and try and run 'rails server' I get the following error:
>
> > carcher@carcher-laptop:~/Code/tgc$ rails server
> > => Booting WEBrick
> > => Rails 3.0.0 application starting in development onhttp://0.0.0.0:3000
> > refinery-cms...@googlegroups.com<refinery-cms%2Bunsu...@googlegroups.com>

Vladimir Krylov

unread,
Sep 15, 2010, 5:19:33 PM9/15/10
to refine...@googlegroups.com
did you do sudo apt-get install ruby1.8-dev and sudo apt-get install build-essential and, finally, apt-get install librmagick-ruby ?

2010/9/16 Ciaran Archer <ciaran...@gmail.com>

Vladimir Krylov

unread,
Sep 15, 2010, 5:19:53 PM9/15/10
to refine...@googlegroups.com
google helps;)

2010/9/16 Vladimir Krylov <s6n...@gmail.com>

Ciaran Archer

unread,
Sep 15, 2010, 6:38:25 PM9/15/10
to Refinery CMS
It seems that sudo apt-get install ruby1.8-dev allowed me to install
the rmagick gem finally. Thank for pointing that out.

No need for the Google comment TBH, I'm not lazy, I have been trying
to get refinerycms working for a few days now. As I said I do not use
Linux or Ruby/Rails for my day job. Sometimes it takes someone with
experience to make sense of problem and offer guidance, so thanks for
that at least.



On Sep 15, 10:19 pm, Vladimir Krylov <s6nu...@gmail.com> wrote:
> google helps;)
>
> 2010/9/16 Vladimir Krylov <s6nu...@gmail.com>
>
>
>
> > did you do sudo apt-get install ruby1.8-dev and sudo apt-get install
> > build-essential and, finally, apt-get install librmagick-ruby ?
>
> > 2010/9/16 Ciaran Archer <ciaran.arc...@gmail.com>
> >> <refinery-cms%2Bunsu...@googlegroups.com<refinery-cms%252Buns...@googlegroups.com>
>
> >> > > For more options, visit this group at
> >> > >http://groups.google.com/group/refinery-cms?hl=en
>
> >> > >http://www.refinerycms.com
>
> >> > --
> >> > Vladimir Krylovhttp://cyprus-city.com
>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Refinery CMS" group.
> >> To post to this group, send email to refine...@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> refinery-cms...@googlegroups.com<refinery-cms%2Bunsu...@googlegroups.com>
> >> For more options, visit this group at
> >>http://groups.google.com/group/refinery-cms?hl=en
>
> >>http://www.refinerycms.com
>
> > --

Ciaran Archer

unread,
Sep 15, 2010, 6:49:50 PM9/15/10
to Refinery CMS
Got further but now seeing this when rake is run:
So from clean install I did everything again and back to where I
started:

ciaran@ciaran-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'


Anyone point me in the right direction here?




On Sep 15, 10:19 pm, Vladimir Krylov <s6nu...@gmail.com> wrote:
> google helps;)
>
> 2010/9/16 Vladimir Krylov <s6nu...@gmail.com>
>
>
>
> > did you do sudo apt-get install ruby1.8-dev and sudo apt-get install
> > build-essential and, finally, apt-get install librmagick-ruby ?
>
> > 2010/9/16 Ciaran Archer <ciaran.arc...@gmail.com>
> >> <refinery-cms%2Bunsu...@googlegroups.com<refinery-cms%252Buns...@googlegroups.com>
>
> >> > > For more options, visit this group at
> >> > >http://groups.google.com/group/refinery-cms?hl=en
>
> >> > >http://www.refinerycms.com
>
> >> > --
> >> > Vladimir Krylovhttp://cyprus-city.com
>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Refinery CMS" group.
> >> To post to this group, send email to refine...@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> refinery-cms...@googlegroups.com<refinery-cms%2Bunsu...@googlegroups.com>
> >> For more options, visit this group at
> >>http://groups.google.com/group/refinery-cms?hl=en
>
> >>http://www.refinerycms.com
>
> > --

Philip Arndt

unread,
Sep 15, 2010, 6:52:10 PM9/15/10
to refine...@googlegroups.com
Hey Ciaran,

Thanks for letting us know that the librmagick stuff worked - can you tell us if the instructions here are accurate (under "Linux")?

Looks like you may have to uninstall ImageMagick 6.5.7-8.. does the bottom post here help you:

Sorry that you're encountering these issues, hopefully we can compile an authoritative list to help people install this stuff perfectly first time as otherwise it's just a pain. :)

Phil

Philip Arndt

unread,
Sep 15, 2010, 6:54:03 PM9/15/10
to refine...@googlegroups.com

Ciaran Archer

unread,
Sep 16, 2010, 8:01:43 AM9/16/10
to Refinery CMS
Hi Phil - thanks for you feedback

The problem is I have uninstalled (alt-get purge) imagemagick 6.5.7-8,
but for some reason I think it is still in a config file someplace
(maybe) so hence the message.

Over the next few days I'll try:

1. Reinstall and purge the imagemagick 6.5.7 again, then remove the
rmagick gem - this was a suggested solution here:

http://ubuntu.stackexchange.com/questions/4181/how-to-resolve-ruby-on-rails-imagemagick-conflict

2. Start from scratch again (clean install) and this time try to build
rmagick against imagemagick 6.5.7-8, i.e. the native packed version
rather than building the later version from source.

If I get it to work I'll post my findings with steps for others, but
it may be a few days - got a day-job and a pregnant wife to take care
of :)

Cheers,
Ciaran

On Sep 15, 11:52 pm, Philip Arndt <p...@resolvedigital.co.nz> wrote:
> Hey Ciaran,
>
> Thanks for letting us know that the librmagick stuff worked - can you tell us if the instructions here are accurate (under "Linux")?http://tutorials.refinerycms.org/tutorials/how-to-install-refinery-pr...

Ciaran Archer

unread,
Sep 17, 2010, 8:24:57 AM9/17/10
to Refinery CMS
Hi all

I'm up and running! I did a clean Ubuntu install, and just used the
pre-installed Imagemagick package. The tutorial you have for Lunix
omits a few things a novice like me needs to do, so I documented all
my steps here:

http://flydillonfly.wordpress.com/2010/09/17/setting-up-refinerycms-on-ubuntu-10-04-lts/

The main problem was that early in the process when I ran into an
issue with RMagick, I presumed I needed a later version of Imagemagick
so I downloaded and installed it from source. There is no need to do
that - none at all. The version 6.5.7-8 will do just fine.

Hope this helps others.

If you need to use the latest version then I found this post that
might help. I haven't tried it though:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=557778

Cheers,
Ciaran

On Sep 16, 1:01 pm, Ciaran Archer <ciaran.arc...@gmail.com> wrote:
> Hi Phil - thanks for you feedback
>
> The problem is I have uninstalled (alt-get purge) imagemagick 6.5.7-8,
> but for some reason I think it is still in a config file someplace
> (maybe) so hence the message.
>
> Over the next few days I'll try:
>
> 1. Reinstall and purge the imagemagick 6.5.7 again, then remove the
> rmagick gem - this was a suggested solution here:
>
> http://ubuntu.stackexchange.com/questions/4181/how-to-resolve-ruby-on...

Philip Arndt

unread,
Sep 17, 2010, 8:32:23 AM9/17/10
to refine...@googlegroups.com
Thanks Ciaran! Hopefully someone will update the tutorial based on your advice.
Reply all
Reply to author
Forward
0 new messages