Forum: Ruby on Rails file_column / Rmagick "invalid image" when image is valid

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
83091837e9bdd145aabb354a39966315?d=identicon&s=25 Sam Bing (thinkobscure)
on 2006-02-15 18:07
(Received via mailing list)
So I've recently finished up my first RoR application and made sure it
all
worked right on the windows machine i developed it on. then deployed it
on
GeekISP.com which runs Open/Free BSD. I had to jump through a few little
hoops to get it working and set the permissions for rails to create
directories, but it still doesnt work right. When i go to add a new item
to
the database and try adding a picture with the entry, even if the
picture is
valid (all lowercase, no special chars in the name), and i can verify
it,
the rmagick check for a valid image returns it invalid when i try to add
it.
i know it can upload the image becuase i can check it made a tmp
directory
and uploaded the picture through the shell, but it wont resize it or
create
a thumb nail like it should, and does on my machine.

1 error prohibited this equipment from being saved
There were problems with the following fields:
Image invalid

im pretty sure that part was generated by this code from within file
column.

from "/file-column/lib/magick_file_column"
<code>
class BaseUploadedFile # :nodoc:
def transform_with_magick
if needs_resize?
begin
img = ::Magick::Image::read(absolute_path).first
rescue ::Magick::ImageMagickError
@magick_errors ||= []
@magick_errors << "invalid"
return
end
</code>

now im wondering what do i need to do or change to get this working
right? it really bugs me becuase it works fine on my box, and the error
it gives doesnt tell me much about what is happening, the logs dont seem
to show anything helpful either.

-Sam
This topic is locked and can not be replied to.