File_column imagemagick strangeness


#1

Hi,
I’m using the basic magick features of file_column,
and while files are uploading fine without the magick options, as soon
as I do something like

:magick => { :size => "400x600" }

I get an ‘invalid file’ error.
Further investigation reveals that the file is in fact invalid because
something somewhere is truncating the file path:

Magick::ImageMagickError in Images#create
unable to open image 

`rian/www/dev.domain.dom/public/images/example.jpg’: No such file or
directory:

(‘image’ should be
`/home/dorian/www/dev.domain.dom/public/images/example.jpg’)

This all happens in the file magick_file_column.rb in the method
transform_with_magick. The line raising the error is:

img = ::Magick::Image::read(absolute_path).first

and if I replace absolute_path with a string I get the same truncation
happening.

I’m going mad trying to sort this out. Has anyone else had this happen
to them, or have any idea what might be going on here?

dorian


I do things for love or money


#2

ok, I answered this myself:

https://launchpad.net/distros/ubuntu/+source/librmagick-ruby/+bug/1299

“When trying to open a file with RMagick::Image.read(filename), the
leading characters of filename are lost on the way to imagemagick”