uninitialized constant Magick in RMagick

T

Todd Gardner

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
 
K

Kaspar Schiess

-----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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAyyibFifl4CA0ImQRAvAyAKCL3SuYSMslkBBoGE/q2hXXhHb1/ACfbJGG
VQJWCHzobe+2g1tEbmRh8pU=
=ncQ5
-----END PGP SIGNATURE-----
 
T

Todd Gardner

Kaspar Schiess said:
-----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
 
K

Kaspar Schiess

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

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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFA0WuNFifl4CA0ImQRAqL+AJ4nzUP82jFOOQ2wQKFtd6XkF2aroQCgl30p
peBfo68MP/HYWUhvmBmo4+0=
=X2H4
-----END PGP SIGNATURE-----
 

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

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top