Forum: Ruby on Rails file_column imagemagick strangeness

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.
Dorian M. (Guest)
on 2006-03-15 06:58
(Received via mailing list)
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
Dorian M. (Guest)
on 2006-03-15 08:36
(Received via mailing list)
ok, I answered this myself:

https://launchpad.net/distros/ubuntu/+source/librm...

"When trying to open a file with RMagick::Image.read(filename), the
leading characters of filename are lost on the way to imagemagick"
This topic is locked and can not be replied to.