# Attachment\_fu working locally but not on server

**URL:** <https://www.ruby-forum.com/t/attachment-fu-working-locally-but-not-on-server/141558>\
**Category:** Rails\
**Created:** [June 27, 2008, 1:15am UTC](https://www.ruby-forum.com/t/attachment-fu-working-locally-but-not-on-server/141558 "2008-06-27T01:15:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pk16](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b19c9b/32.png) [@pk16](https://www.ruby-forum.com/u/pk16)\
**Post date:** [June 27, 2008, 1:15am UTC](https://www.ruby-forum.com/t/attachment-fu-working-locally-but-not-on-server/141558/1 "2008-06-27T01:15:14Z")

</div>

Hi, I’m trouble shooting a strange issue and was wondering if anyone  
could point me in the right direction.

I installed attachment\_fu as a plugin using instant rails 2.0.2  
locally. Everything is working fine but when I moved this code to  
dream host it no longer works. If I look in my log on my local machine  
I see a call to a new action, I upload the photo or file —\> submit  
and I see the create action and a form post gets submitted and the  
photo is there. However, over on dream host, I see the new action get  
called but after I submit the file for upload it calls the index  
action and never loads the data to the table and stores the photo to  
the file system.

Any help would be appreciated. I’ve verified the gem Rmagick is local  
to my app and I recently added :processor =\>‘Rmagick’ to my model. But  
that didn’t solve the issue either.

---

<div class="post-metadata">

**Author:** ![pk16](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b19c9b/32.png) [@pk16](https://www.ruby-forum.com/u/pk16)\
**Post date:** [June 27, 2008, 3:21am UTC](https://www.ruby-forum.com/t/attachment-fu-working-locally-but-not-on-server/141558/2 "2008-06-27T03:21:33Z")

</div>

For the benefit to others. The issue appears to be related to dream  
hosts apache config and the fact that attachment\_fu writes the same  
model name say ‘photos’ for instance to the public directory. This was  
causing a redirect to index. The fix apparently is to modify  
the .htaccess file by adding this

DirectorySlash Off

or I haven’t tried this yet but I saw that someone posted some code to  
add to the application.rb controller

def default\_url\_options(options)  
{ :trailing\_slash =\> true }  
end

also, here are some links I found on the topic

[http://www.ruby-forum.com/topic/103619](http://www.ruby-forum.com/topic/103619)

> **[iqueryable.com](http://ww38.iqueryable.com/2007/06/21/actsasattachementAndAttachmentfuNotWorkingInProduction.aspx)**
>
> This domain may be for sale!
