attachment_fu and RMagick

Posted by trobrock on Stack Overflow See other posts from Stack Overflow or by trobrock
Published on 2010-05-31T03:27:01Z Indexed on 2010/05/31 3:32 UTC
Read the original article Hit count: 439

After finally getting RMagick installed on my Mac I have set up attachment_fu according to the tutorial here: http://clarkware.com/cgi/blosxom/2007/02/24#FileUploadFu&gt when I try and upload a file via the upload form I get around 80 messages like these:

/Library/Ruby/Gems/1.8/gems/rmagick-2.13.1/lib/RMagick.rb:44: warning: already initialized constant PercentGeometry
/Library/Ruby/Gems/1.8/gems/rmagick-2.13.1/lib/RMagick.rb:45: warning: already initialized constant AspectGeometry
/Library/Ruby/Gems/1.8/gems/rmagick-2.13.1/lib/RMagick.rb:46: warning: already initialized constant LessGeometry
/Library/Ruby/Gems/1.8/gems/rmagick-2.13.1/lib/RMagick.rb:47: warning: already initialized constant GreaterGeometry

I did some searching and found that this problem can arise when you require RMagick twice in an application using different casing for the require statement: http://work.rowanhick.com/2007/12/19/require-rmagick-and-case-sensitivity/ I am not requiring it myself, but I was thinking maybe with the config.gem "rmagick" line in my environment.rb file rails might be requiring it.

After the form submits it gives me a validation error of: Content type is not included in the list I have checked the source for attachement_fu and found the image/png in the list of content types so I don't believe that is the proper error message: http://github.com/technoweenie/attachment_fu/blob/master/lib/technoweenie/attachment_fu.rb

Does anyone have any ideas on how I can get this to work?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about upload