# Attachment\_fu and observers/emailing

**URL:** <https://www.ruby-forum.com/t/attachment-fu-and-observers-emailing/118176>\
**Category:** Rails\
**Created:** [October 24, 2007, 2:37pm UTC](https://www.ruby-forum.com/t/attachment-fu-and-observers-emailing/118176 "2007-10-24T14:37:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![welly](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/f0a364/32.png) [@welly](https://www.ruby-forum.com/u/welly)\
**Post date:** [October 24, 2007, 2:37pm UTC](https://www.ruby-forum.com/t/attachment-fu-and-observers-emailing/118176/1 "2007-10-24T14:37:57Z")

</div>

Hi all,

I’m developing a site where a user can upload their CV/resume with a  
profile, and am using restful\_authentication for this with  
attachment\_fu to handle the file uploading.

When a user creates their profile/user account, I’ve got an observer  
that will email the site admin with a copy of the uploaded CV. My  
user\_observer looks something like:

class UserObserver \< ActiveRecord::Observer  
def after\_create(user)  
UserMailer.deliver\_signup(user) unless user.activation\_code.blank?  
UserMailer.deliver\_notification(user)  
end  
end

The problem I’m having is when the deliver\_notification method is  
called, I get an error reporting:

No such file or directory - /users/0000/3472/alastairmoore.cv.pdf

Now I’m guessing that attachment\_fu hasn’t moved the file from a  
temporary location to /users/0000/3472 by the time the observer fires  
off. Would this be correct and if so, can anyone suggest a way round  
this?

Many thanks,

Alastair

---

<div class="post-metadata">

**Author:** ![welly](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/f0a364/32.png) [@welly](https://www.ruby-forum.com/u/welly)\
**Post date:** [October 24, 2007, 4:19pm UTC](https://www.ruby-forum.com/t/attachment-fu-and-observers-emailing/118176/2 "2007-10-24T16:19:16Z")

</div>

Ok, problem solved. It was a path error.
