Attachment_fu and rails 2.3.2 no image on disk

Hi,

After upgrade to Rails 2.3.2 I have a problem with attachments.

After uploading the attachment in the images table there is a new
record. But the file does not exist on the file system.

has_attachment :content_type => :image,
:storage => :file_system,
:size => 0.megabyte…2.megabytes,
:thumbnails => { :thumb => ‘150x150>’,
:thumb72 => ‘72x72>’,
:thumb90 => ‘90x90>’,
:thumb150fixed => ‘150x’,
:thumb120 => ‘120x120>’,
:thumb300 => ‘300x300>’,
:thumb400 => ‘400x400>’,
:thumb500 => ‘500x500>’
},
:processor => MiniMagick

Any help appreciated.

Michal.

The error could be so many things, these details that you gived are
not sufficient…

Did you check your log files for any possible error?
Are you sure that MiniMagick is working well?
The new version of rails is installed correctly?
Did you tryed to upload different kinds of files?

Give a little more details please

On 27 mayo, 02:09, Michal B. [email protected]

Julian L. wrote:

His problem is most likely a permissions issue.

Did the “permission policy” between rails 2.1 and 2.3 change?

On 27/05/2009, at 9:34 PM, Michal B. wrote:

Julian L. wrote:

His problem is most likely a permissions issue.

Did the “permission policy” between rails 2.1 and 2.3 change?

LOL what’s the permission policy?

Whichever user is running the app needs write access if you want to
write files, unless I’m seriously mistaken.

Julian.


Learn: http://sensei.zenunit.com/
Last updated 20-May-09 (Rails, Basic Unix)
Blog: http://random8.zenunit.com/
Twitter: http://twitter.com/random8r

The problem is probably something similar to
http://blog.methodmissing.com/2008/1/19/edge-callback-refactorings-attachment_fu/

In my case the method process_attachment defined as a after_validation
callback doesn’t get called for the second attachment of my model.

I replaced beginning of the method:

def after_process_attachment
if save_attachment?
(…)

I don’t know what will it cause other than making my attchements work.
But they do work now, and I’m glad.

LOL what’s the permission policy?

Whichever user is running the app needs write access if you want to
write files, unless I’m seriously mistaken.

Julian.

Whatever, I don’t know what could it mean. I’m not that familiar with
rails unfortunately.

The problem is that after migration the attachments stopped working. So
if we discuss permissions to file system the first thing that comes to
my mind is - did the permission policy changed.

The definition of the term “permission policy” I used is from Java
environment, cos I’m used to it. For e.g.
http://java.sun.com/j2se/1.4.2/docs/guide/security/permissions.html. I
could not find any more suitable.

His problem is most likely a permissions issue.


Learn: http://sensei.zenunit.com/
Last updated 20-May-09 (Rails, Basic Unix)
Blog: http://random8.zenunit.com/
Twitter: http://twitter.com/random8r