Forum: Ruby on Rails attachment_fu doesnt resize photo and create thumbnails

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.
Tam K. (Guest)
on 2009-03-17 06:57
Hello,

I'm trying to use attachment_fu in order to upload photo and create
three versions of thumbnails (large small and medium). This works
perfect of my mac book. but on my production server it uploads the image
but doesn't create three version of thumbnails!! I researched on the
site and googled a bit, and tried couple of things suggested with no
success.
My server has Linux Debian on it (VPS)

Here is what the photo model looks like:
------------------------------------------------------
class Photo < ActiveRecord::Base
   belongs_to :account, :foreign_key => :account_id
   belongs_to :user, :foreign_key => :user_id

   has_attachment :content_type => :image,
                  :storage => :file_system,
                  :max_size => 500.kilobytes,
                  :resize_to => '384x256>',
                  :thumbnails => {
                    :large => '150x150>',
                    :medium => '64x64>',
                    :small => '48x48>'
                  }

   validates_as_attachment #to prevent image sizes out of range from
being saved
end
------------------------------------------------------

I checked in the log files (production.log, mongrel.log and apache error
log with no errors showing!) Any ideas how I can approach this problem.

Your help is appreciated.

Tam
Eric (Guest)
on 2009-03-17 07:25
(Received via mailing list)
You should verify that your configured processor, such as rmagick/
imagemagick, is installed and available to the user under which the
application runs.
Tam K. (Guest)
on 2009-03-17 07:28
you were right Eric I just figured out I had to execute this line as my
RMagick was installed but not configured properly:

export LD_LIBRARY_PATH=/usr/local/lib

Now it works by making four versions of the photo but they are the same!
I mean it doesn't actually create different sizes of images. Any ideas??
Tam K. (Guest)
on 2009-03-17 09:27
I realized that the problem was from RMagick/ImageMagick I tried
installing different versions of both with no success.

I resolved the problem by using ImageScience/FreeImage instead. It seems
to work better for me now!

Thanks,

Tam
"Wolas!" (Guest)
on 2009-03-17 11:09
(Received via mailing list)
recently i have been hearing a lot of good about paperclip to replace
attachment_fu
Peter De Berdt (Guest)
on 2009-03-17 11:16
(Received via mailing list)
The thing is that even Paperclip would fail here, since it's clearly
related to RMagick. Paperclip uses the same library to scale its
images. I prefer attachment_fu over paperclip, it has a couple of
features Paperclip doesn't have and it has worked perfectly for me.
The right tool for the right job.

On 17 Mar 2009, at 10:09, Wolas! wrote:

> recently i have been hearing a lot of good about paperclip to replace
> attachment_fu
>
> On Mar 17, 8:27 am, Tam K. <removed_email_address@domain.invalid> wrote:
>> I realized that the problem was from RMagick/ImageMagick I tried
>> installing different versions of both with no success.
>>
>> I resolved the problem by using ImageScience/FreeImage instead. It
>> seems
>> to work better for me now!

Best regards

Peter De Berdt
This topic is locked and can not be replied to.