gem and rmagic confusion

P

Paul

Im very confused by whats happening with rmagic and rubygem. Now, Im
the first to admit that i didnt read much in the way of the
installation instructions.

Ive got gems installed , 0.8.1 on windows
Ive installed rmagic with the gem:

C:\>gem list

*** LOCAL GEMS ***

RMagick-win32 (1.6.0)
RMagick is an interface between the Ruby programming language and
the ImageMagick and GraphicsMagick image processing libraries.

sources (0.0.1)
This package provides download sources for remote gem installation


now, the rmagic sample use require 'RMagick'
which gives me:
C:/ruby/lib/ruby/gems/1.8/gems/RMagick-win32-1.6.0-mswin32/doc/ex/border.rb:2:in
`require': No such file to load -- RMagick (LoadError)
from C:/ruby/lib/ruby/gems/1.8/gems/RMagick-win32-1.6.0-mswin32/doc/ex/border.rb:2

If I change to :
require 'rubygems'
require_gem 'Rmagic'

I get
c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:121:in `activate':
(Gem::LoadError)
RubyGem version error: RMagick(1.6.0 not > 0.0.0)
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:34:in
`require_gem'
from C:/ruby/lib/ruby/gems/1.8/gems/RMagick-win32-1.6.0-mswin32/doc/ex/border.rb:6

I can copy the rmgic.rb and rmaigic.so to C:\ruby\lib\ruby\1.8 and the
samples work.

Thanks

Paul
 
K

Kaspar Schiess

(e-mail address removed) (Paul) wrote in @posting.google.com:
Im very confused by whats happening with rmagic and rubygem. Now, Im
the first to admit that i didnt read much in the way of the
installation instructions.

Hello Paul,

There seems to be an interaction between new rubygem code and an old gem:
The only sequence that really works good is

require 'rubygems'
require 'rmagick'

or more simply

in the shell:
set RUBYOPT=rubygems

in the script:
require 'rmagick'

Any combination of require_gem will fail, since the gem seems not to
respond properly to version questions.

There is code to assure backwards compatibility with gems that are not
compiled using the latest version of rmagick, but that code seems to be
broken.

Hope the above works for you.
kaspar

hand manufactured code - www.tua.ch/ruby
 
K

Kaspar Schiess

There is code to assure backwards compatibility with gems that are not
compiled using the latest version of rmagick, but that code seems to be
broken.

sub! /latest version of rmagick/, 'latest version of rubygems'

.. of course ..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top