Known RMagick bug?

hey does anyone know if there is some type of workaround or known bug
fix available to individuals who are trying to get RMagick and Rails
talking to each other properly on WindowsXP / Apache2 / FastCGI?

Ive been frustrated over this issue since last week and I have barely
gotten anyone to respond, and not a single solution.

I have installed ImageMagick and RMagick and tested both as per the
documentation, as soon as I bring it into my rails application, it fails
giving me NameError messages.

im just trying some super basic stuff right now, so in my application
controller I have the following code (equal signs not included):

===================================================

require “RMagick”

class BiographyController < ApplicationController

include Magick

layout “public”

def index

helloworld = Magick::ImageList.new( "images/rails.png" )

@biography = Biography.find( :all )

end

end

===================================================

Now… looking at the code above, is anything wrong?

I have only been using Ruby on Rails for a few weeks now, and learning
as much as I can as I go. I also have no previous knowledge of the Ruby
language… so bare with me if its painfully obvious… im trying though
if that counts…

The Error I get is as follow (equal signs not included):

===================================================
NameError in BiographyController#index

uninitialized constant ImageList

RAILS_ROOT: C:/web/firstappever/public/…/config/…

This error occured while loading the following files:
magick/image_list.rb

If I comment out the @biography, error still occurs… im desperate to
get this working properly…

my setup is as follows:

WinXP SP2 (win32)
Ruby 1.8.4
Rails 1.1.6
RMagick 1.13.0
ImageMagick 6.2.9-Q8

Sometimes I get another NameError, usually when first loading the
application section where I have this code placed… and its:

===================================================

uninitialized constant Enum

This error occured while loading the following files (equal signs not
included):
C:/web/firstappever/public/…/config/…/app/controllers/biography_controller.rb
RMagick
magick/enum.rb

===================================================

Right now im at a 100% stand still until I can get this working… if I
need to drop back a few versions of ruby or rails or whatever, then
please let me know, but im dying to get this working!

Thanks to anyone who can show me the light!!

What happens if you remove the “include Magick” line?

Try :

helloworld = ImageList.new( “images/rails.png” )

On 9/13/06, Curtis S. [email protected] wrote:

What happens if you remove the “include Magick” line?


Posted via http://www.ruby-forum.com/.


rm -rf / 2>/dev/null - http://null.in

Dont judge those who try and fail, judge those who fail to try…

hey guys, ill post both replies in this post instead of two seperate
posts.

First of all, thanks for the replies!!

==================
RE: Curtis S.

I tried your method, and removed the “include Magick” line, but I still
receive the exact same error as before. I tried to combine your method
with the method explained directly under yours, the only change was the
error said:

=============
This error occured while loading the following files:
image_list.rb

So not much luck there unfortunately, any other advice is welcomed, this
is the most activity ive had on it all week!!

==============
RE Pratik Naik

As I typed above, I tried this method combined with removing the
“include Magick” line, and I get the same errors, wit hthe slight
adjustment of the error occuring on the file it is trying to load (I
realize there is not a physical file, but a reference to a class name).

Any other ideas… its getting close… I can feel it in my bones!!

Pratik Naik wrote:

Try :

helloworld = ImageList.new( “images/rails.png” )

On 9/13/06, Curtis S. [email protected] wrote:

What happens if you remove the “include Magick” line?


Posted via http://www.ruby-forum.com/.


rm -rf / 2>/dev/null - http://null.in

Dont judge those who try and fail, judge those who fail to try…

hey… just tried it same error shows up…

Pratik Naik wrote:

As I typed above, I tried this method combined with removing the
“include Magick” line,

Try it without removing “include Magick”.

Thanks,
Pratik

rm -rf / 2>/dev/null - http://null.in

Dont judge those who try and fail, judge those who fail to try…

As I typed above, I tried this method combined with removing the
“include Magick” line,

Try it without removing “include Magick”.

Thanks,
Pratik

rm -rf / 2>/dev/null - http://null.in

Dont judge those who try and fail, judge those who fail to try…

Hey… I actually have tried this way before as well, still the same
error.

I only use 2 plugins on my website, custom_err_msg, and EmailColumn, ive
heard sometimes plugins overwrite or interfere with some NameSpaces…
but im not 100% sure my two plugins have anything to do with this case…

Curtis S. wrote:

Okay, out of curiousity, try:

helloworld = ::Magick::ImageList.new( “images/rails.png” )

Notice the extra prepended ::

Okay, out of curiousity, try:

helloworld = ::Magick::ImageList.new( “images/rails.png” )

Notice the extra prepended ::

hey… just wondering if you had any other ideas :S Ive done this install
on 3 different PC computers, home, work and all of them have had the
same problem… so thats weird!

thanks for all the help during the day today though!

adam d wrote:

Hey… I actually have tried this way before as well, still the same
error.

I only use 2 plugins on my website, custom_err_msg, and EmailColumn, ive
heard sometimes plugins overwrite or interfere with some NameSpaces…
but im not 100% sure my two plugins have anything to do with this case…

Curtis S. wrote:

Okay, out of curiousity, try:

helloworld = ::Magick::ImageList.new( “images/rails.png” )

Notice the extra prepended ::

adam d wrote:

hey… just wondering if you had any other ideas :S Ive done this install
on 3 different PC computers, home, work and all of them have had the
same problem… so thats weird!

Are they all windows machines?

hey does anyone have any further ideas on this?

or does anyone have any references on NameSpace Errors so I can read up
and try to find out the problem myself some more…

thanks.

adam d wrote:

yup all 3 of them, apache2/fastcgi, (the rails app is working outside of
the sections Im trying to add RMagick too)

Curtis S. wrote:

adam d wrote:

hey… just wondering if you had any other ideas :S Ive done this install
on 3 different PC computers, home, work and all of them have had the
same problem… so thats weird!

Are they all windows machines?

yup all 3 of them, apache2/fastcgi, (the rails app is working outside of
the sections Im trying to add RMagick too)

Curtis S. wrote:

adam d wrote:

hey… just wondering if you had any other ideas :S Ive done this install
on 3 different PC computers, home, work and all of them have had the
same problem… so thats weird!

Are they all windows machines?

adam d wrote:

hey does anyone have any further ideas on this?

So, it only fails in Rails, right? It works from irb?

irb(main):001:0> require ‘RMagick’
=> true
irb(main):002:0> a = Magick::ImageList.new(’/path/to/pic/pic.jpg’)
=> [/path/to/pic/pic.jpg JPEG 299x356 299x356+0+0 DirectClass 8-bit
48kb]
scene=0

adam d wrote:

hey does anyone have any further ideas on this?

Reboot?
http://rubyforge.org/forum/forum.php?thread_id=7956&forum_id=33

I have rebooted the entire computer and the webservers… on all 3
systems…

Curtis S. wrote:

adam d wrote:

hey does anyone have any further ideas on this?

Reboot?
http://rubyforge.org/forum/forum.php?thread_id=7956&forum_id=33

im still having major problems with this, so if anyone can offer
anything further please let me know… im totally stumped.

adam d wrote:

I have rebooted the entire computer and the webservers… on all 3
systems…

Curtis S. wrote:

adam d wrote:

hey does anyone have any further ideas on this?

Reboot?
http://rubyforge.org/forum/forum.php?thread_id=7956&forum_id=33

hey… yea its working in IRB.

Microsoft Windows XP [Version 5.1.2600]
© Copyright 1985-2001 Microsoft Corp.

irb
irb(main):001:0> require “RMagick”
=> true
irb(main):002:0> a = Magick::ImageList.new(“big.jpg”)
=> [big.jpg JPEG 300x250 300x250+0+0 DirectClass 8-bit 10kb]
scene=0
irb(main):003:0> exit

Curtis S. wrote:

adam d wrote:

hey does anyone have any further ideas on this?

So, it only fails in Rails, right? It works from irb?

irb(main):001:0> require ‘RMagick’
=> true
irb(main):002:0> a = Magick::ImageList.new(’/path/to/pic/pic.jpg’)
=> [/path/to/pic/pic.jpg JPEG 299x356 299x356+0+0 DirectClass 8-bit
48kb]
scene=0