Topic: rmagick headaches :/

hey all,
When I do this in script/console I get:
>> require 'RMagick'
=> true
>> include Magick
=> Object
>> f = Image.new(100,100) { self.background_color = "red" }
=>   100x100 DirectClass 16-bit
>> f.crop_resized(50,50)
=>   50x50 DirectClass 16-bit

But in my application I keep getting the same error as if rmagick was
not installed though it is and I can use it with irb. This is the
error I get:

ActionView::TemplateError (undefined method `crop_resized' for
nil:NilClass) on line #7 of app/views/items/list.rhtm

I did put

require 'RMagick'
include Magick

in my application.rb and environment.rb but my rmagick install keeps getting ignored hmm
any idea what's wrong or where shall I put include Magick and require 'RMagick'?

thanx in advance

Pat

Re: rmagick headaches :/

I don't think it's a problem with RMagick per se.  If you look at this part:
"undefined method `crop_resized' for nil:NilClass"
It's saying that you called:
nil.crop_resized

What that means is your RMagick object is actually a nil object.  Post your code if this keeps giving you strugs - we'd be happy to look at it.

Re: rmagick headaches :/

indeed it was my code, there was a nil object in there thanx.