# Attachment\_FU -- stops creating after first file creation

**URL:** <https://www.ruby-forum.com/t/attachment-fu-stops-creating-after-first-file-creation/107738>\
**Category:** Rails\
**Created:** [June 25, 2007, 9:15pm UTC](https://www.ruby-forum.com/t/attachment-fu-stops-creating-after-first-file-creation/107738 "2007-06-25T21:15:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnhutch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e9bcb4/32.png) [@johnhutch](https://www.ruby-forum.com/u/johnhutch)\
**Post date:** [June 25, 2007, 9:15pm UTC](https://www.ruby-forum.com/t/attachment-fu-stops-creating-after-first-file-creation/107738/1 "2007-06-25T21:15:31Z")

</div>

I’m using attachment\_fu for award nomination site and I’m running into  
a very strange problem that I’ve found absolutely zero information on.  
When running on our remote server (redhat fedora), I can only upload  
one file. After the classname/0000/0002 or whatever directory gets  
created once and the file is upload and written, I cannot seem to  
write to that directory ever again without deleting it. I don’t get an  
error. I just get returned to the controller index with no uploaded  
data any time I try to write. The original file that was there remains  
intact and working until I destroy it (which works). Even after  
destroying it, I can’t create a new file.

Interestingly enough, I don’t have this problem at all when running on  
my local servers (two different macs). Only on the remote server.

Any help, suggestions, links, or just pointing in the right direction  
is most appreciated.

---

<div class="post-metadata">

**Author:** ![johnhutch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e9bcb4/32.png) [@johnhutch](https://www.ruby-forum.com/u/johnhutch)\
**Post date:** [September 25, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/attachment-fu-stops-creating-after-first-file-creation/107738/2 "2007-09-25T23:04:25Z")

</div>

The theory at the moment is that when attachment\_fu creates the  
classname/0000/0002 directory structure, it perhaps checks to see if  
it exists first. When it sees that classname/ already exists, the  
process stops for some reason. Does anyone know where I can find the  
bit of code in attachment\_fu that might decide this?

---

<div class="post-metadata">

**Author:** ![johnhutch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e9bcb4/32.png) [@johnhutch](https://www.ruby-forum.com/u/johnhutch)\
**Post date:** [September 25, 2007, 11:06pm UTC](https://www.ruby-forum.com/t/attachment-fu-stops-creating-after-first-file-creation/107738/3 "2007-09-25T23:06:43Z")

</div>

[http://bs.techno-weenie.net/!source/2920/plugins/attachment\_fu/lib/technoweenie/attachment\_fu/backends/file\_system\_backend.rb#36](http://bs.techno-weenie.net/!source/2920/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/file_system_backend.rb#36)

---

<div class="post-metadata">

**Author:** ![johnhutch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e9bcb4/32.png) [@johnhutch](https://www.ruby-forum.com/u/johnhutch)\
**Post date:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/attachment-fu-stops-creating-after-first-file-creation/107738/4 "2007-09-25T23:10:50Z")

</div>

Thanks for the link, Isaac. It’s definitely putting me on the right  
path. Thing is… I’m having a really hard time discerning what  
exactly it is that this code is doing. Would anyone care to parse some  
of the logic and syntax for me? I’d greatly appreciate it.
