Uninitialized constant Magick in RMagick

Hello everyone,

I and using the Windows machines by necessity :~(

I just installed Ruby Magic and it said that it installed properly
however now I get this error when I try run any script.

The command I type is:
require 'RMagick'

The error is:
c:/ruby/lib/ruby/gems/1.8/gems/RMagick-win32-1.5.0-mswin32/lib/RMagick.rb:5:
uninitialized constant Magick (NameError)

The error points to:
images = Magick::ImageList.new("images/Button_A.gif",
"images/Button_B.gif", "images/Button_C.gif")

Thanks in advance for any suggestions.

Todd

Hello Todd,

I suggest you uninstall your gem and reinstall. This should put the size
of your RMagick.rb to 45'079 bytes again, which it is on my machine. You
seem to have overwritten the file somehow.

kaspar

Kaspar Schiess <eule@space.ch> wrote in message news:<caf92p$fqa$2@sea.gmane.org>...

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Todd,

I suggest you uninstall your gem and reinstall. This should put the size
of your RMagick.rb to 45'079 bytes again, which it is on my machine. You
seem to have overwritten the file somehow.

kaspar

Hello Kaspar,

I just uninstalled and reinstall the jam as you suggested above. It
did not seem to make a difference. This is just for your information
I greatly appreciate all you are doing.

···

===============================================================
Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.

C:\rm150>ruby -v
ruby 1.8.1 (2003-12-25) [i386-mswin32]

===============================================================
C:\>gem --uninstall RMagick
Attempting to uninstall gem 'RMagick'
Successfully uninstalled RMagick-win32 version 1.5.0

C:\>cd rm150

C:\rm150>dir
Volume in drive C is roy2d1p1
Volume Serial Number is B03F-A211

Directory of C:\rm150

06/15/2004 02:44p <DIR> .
06/15/2004 02:44p <DIR> ..
05/18/2004 10:46p 14,999 ORIG_README.txt
06/15/2004 02:44p <DIR> postinstall
05/18/2004 08:33p 317 postinstall.rb
05/31/2004 10:37a 5,774 README
05/31/2004 10:37a 7,232 README.html
05/18/2004 09:04p 14,467,969 RMagick-win32-1.5.0-mswin32.gem
11/30/2003 10:44p 1,639 rubyStyle.css
               6 File(s) 14,497,930 bytes
               3 Dir(s) 6,195,765,248 bytes free

C:\rm150>gem --install RMagick-win32-1.5.0-mswin32.gem
Attempting local installation of 'RMagick-win32-1.5.0-mswin32.gem'
Successfully installed RMagick-win32 version 1.5.0

C:\rm150>postinstall.rb
RMagick 1.5.0 win32 Post Installation (see enclosed README for license
informati
on)
detecting available fonts, writing to config/type-windows.mgk...ok.
setting MAGICK_CONFIGURE_PATH to
'c:/ruby/lib/ruby/gems/1.8/gems/RMagick-win32-1
..5.0-mswin32/config'.
setting is only for current user.
all done.

C:\>cd ruby\lib\ruby\gems\1.8\gems\RMagick-win32-1.5.0-mswin32\lib

C:\ruby\lib\ruby\gems\1.8\gems\RMagick-win32-1.5.0-mswin32\lib>dir
Volume in drive C is roy2d1p1
Volume Serial Number is B03F-A211

Directory of C:\ruby\lib\ruby\gems\1.8\gems\RMagick-win32-1.5.0-mswin32\lib

06/15/2004 02:46p <DIR> .
06/15/2004 02:46p <DIR> ..
06/15/2004 02:46p 45,079 RMagick.rb
06/15/2004 02:46p 3,193,856 RMagick.so
               2 File(s) 3,238,935 bytes
               2 Dir(s) 6,124,785,664 bytes free

C:\ruby\lib\ruby\gems\1.8\gems\RMagick-win32-1.5.0-mswin32\lib>irb
irb(main):001:0> require 'RMagick.rb'
=> true
irb(main):002:0> require 'RMagick.so'
=> false

Thank you,

Todd

Hello all,

===============================================================
C:\>cd ruby\lib\ruby\gems\1.8\gems\RMagick-win32-1.5.0-mswin32\lib

C:\ruby\lib\ruby\gems\1.8\gems\RMagick-win32-1.5.0-mswin32\lib>dir
Volume in drive C is roy2d1p1
Volume Serial Number is B03F-A211

Directory of

C:\ruby\lib\ruby\gems\1.8\gems\RMagick-win32-1.5.0-mswin32\lib

06/15/2004 02:46p <DIR> .
06/15/2004 02:46p <DIR> ..
06/15/2004 02:46p 45,079 RMagick.rb
06/15/2004 02:46p 3,193,856 RMagick.so
               2 File(s) 3,238,935 bytes
               2 Dir(s) 6,124,785,664 bytes free

C:\ruby\lib\ruby\gems\1.8\gems\RMagick-win32-1.5.0-mswin32\lib>irb
irb(main):001:0> require 'RMagick.rb'
=> true
irb(main):002:0> require 'RMagick.so'
=> false

It seems as though Todd's installation fails to load a shared object
produced by my mingw version of Ruby, compiled from the same source as
his Ruby installation, but compiled by mswin.

Is this a known problem ? How can one produce cross-compiler compatible
shared objects ? Did anyone test RMagick binary install using the
batteries included installer on windows ?

I greatly appreciate any suggestions.

kaspar

semantics & semiotics
code manufacture

www.tua.ch/ruby