# Attachment\_fu not working on Textdrive

**URL:** <https://www.ruby-forum.com/t/attachment-fu-not-working-on-textdrive/108243>\
**Category:** Rails\
**Created:** [June 30, 2007, 11:35pm UTC](https://www.ruby-forum.com/t/attachment-fu-not-working-on-textdrive/108243 "2007-06-30T23:35:12Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![chirag](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@chirag](https://www.ruby-forum.com/u/chirag)\
**Post date:** [June 30, 2007, 11:35pm UTC](https://www.ruby-forum.com/t/attachment-fu-not-working-on-textdrive/108243/1 "2007-06-30T23:35:12Z")

</div>

I have attachment\_fu working on my local Windows machine (localhost:  
3000)

But when I transfer it to Textdrive (Solaris), it doesn’t work. Any  
ideas?

Give it a shot:  
[http://haloresearch.textdriven.com:8217/raw\_data\_files/new](http://haloresearch.textdriven.com:8217/raw_data_files/new)

I haven’t got the logger working yet on TextDrive, but that will be my  
next step. Any suggestion on what things to look at first?

Chirag

---

<div class="post-metadata">

**Author:** ![chirag](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@chirag](https://www.ruby-forum.com/u/chirag)\
**Post date:** [July 2, 2007, 12:39am UTC](https://www.ruby-forum.com/t/attachment-fu-not-working-on-textdrive/108243/2 "2007-07-02T00:39:26Z")

</div>

It seemed to upload fine for me,

how if the problem is in the listing, consider the file location/or  
permissions on the directory of where the files are being uploaded to.

---

<div class="post-metadata">

**Author:** ![chirag](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@chirag](https://www.ruby-forum.com/u/chirag)\
**Post date:** [July 2, 2007, 7:24pm UTC](https://www.ruby-forum.com/t/attachment-fu-not-working-on-textdrive/108243/3 "2007-07-02T19:24:43Z")

</div>

I changed the file permissions to 777 all the way down to the storage  
directory (/public/raw\_data\_files) for the sake of testing and it  
still does not work.

It did work once when I first uploaded it but hasn’t worked since.

any more ideas? thanks

Chirag

---

<div class="post-metadata">

**Author:** ![chirag](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@chirag](https://www.ruby-forum.com/u/chirag)\
**Post date:** [July 6, 2007, 7:56am UTC](https://www.ruby-forum.com/t/attachment-fu-not-working-on-textdrive/108243/4 "2007-07-06T07:56:15Z")

</div>

What about the setting of attachment\_fu, does it use a different image  
processing or storage facility on the production server?

---

<div class="post-metadata">

**Author:** ![chirag](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@chirag](https://www.ruby-forum.com/u/chirag)\
**Post date:** [July 14, 2007, 4:38am UTC](https://www.ruby-forum.com/t/attachment-fu-not-working-on-textdrive/108243/5 "2007-07-14T04:38:17Z")

</div>

I’m also having problems getting attachment\_fu to work on my shared  
TextDrive host.

I’ve tried using all three of the image processing packages but get  
the same error (below) with each.

chirag, have you had any success getting this working?

The error I get is the following:

NoMethodError: undefined method `alias_method_chain' for Image:Class from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/ active_record/base.rb:1129:in`method\_missing’  
from script/…/config/…/config/…/vendor/plugins/  
attachment\_fu/lib/technoweenie/attachment\_fu/processors/  
mini\_magick\_processor.rb:8:in `included' from script/../config/../config/../vendor/plugins/ attachment_fu/lib/technoweenie/attachment_fu.rb:92:in`include’  
from script/…/config/…/config/…/vendor/plugins/  
attachment\_fu/lib/technoweenie/attachment\_fu.rb:92:in `has_attachment' from script/../config/../config/../app/models/image.rb:10 from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/ active_support/dependencies.rb:140:in`load’  
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/  
active\_support/dependencies.rb:140:in `load' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/ active_support/dependencies.rb:56:in`require\_or\_load’  
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/  
active\_support/dependencies.rb:30:in `depend_on' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/ active_support/dependencies.rb:85:in`require\_dependency’  
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/  
active\_support/dependencies.rb:98:in `const_missing' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/ active_support/dependencies.rb:131:in`const\_missing’  
from (irb):1

Which, while I’m pretty much a Rails newbie, leads me to believe that  
possible the version of rails running on the host (Rails 1.1.6) is not  
up-to-date enough to support attachment\_fu… Is that a fair  
assessment?

D

---

<div class="post-metadata">

**Author:** ![chirag](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@chirag](https://www.ruby-forum.com/u/chirag)\
**Post date:** [July 14, 2007, 1:47pm UTC](https://www.ruby-forum.com/t/attachment-fu-not-working-on-textdrive/108243/6 "2007-07-14T13:47:55Z")

</div>

D,  
attachment\_fu requires Rails 1.2+.  
Chirag

---

<div class="post-metadata">

**Author:** ![chirag](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@chirag](https://www.ruby-forum.com/u/chirag)\
**Post date:** [July 16, 2007, 8:53am UTC](https://www.ruby-forum.com/t/attachment-fu-not-working-on-textdrive/108243/7 "2007-07-16T08:53:06Z")

</div>

On 7/15/07, chirag [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ```
> def default_url_options(options)
> { :trailing_slash => true }
> end
> 
> ```

You do realize that’s due to funky rewrite rules in apache, right?  
I’ve never run into that with nginx. I think you can just put this in  
your htaccess too:

DirectorySlash Off

–  
Rick O.  
[http://lighthouseapp.com](http://lighthouseapp.com)  
[http://weblog.techno-weenie.net](http://weblog.techno-weenie.net)  
[http://mephistoblog.com](http://mephistoblog.com)

---

<div class="post-metadata">

**Author:** ![chirag](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@chirag](https://www.ruby-forum.com/u/chirag)\
**Post date:** [August 8, 2007, 6:28am UTC](https://www.ruby-forum.com/t/attachment-fu-not-working-on-textdrive/108243/8 "2007-08-08T06:28:46Z")

</div>

Actually, the server is using lighttpd. The same thing may be occuring  
though

---

<div class="post-metadata">

**Author:** ![chirag](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@chirag](https://www.ruby-forum.com/u/chirag)\
**Post date:** [July 16, 2007, 12:03am UTC](https://www.ruby-forum.com/t/attachment-fu-not-working-on-textdrive/108243/9 "2007-07-16T00:03:26Z")

</div>

I found the answer to my own problem

After some debugging and logging, I noticed that the ‘create’ action  
was not being registered by Rails. The ‘new’ action would jump  
straight to the ‘index’ action, which is a display list of the  
uploaded files. Thanks to Steve E.’ June 20, 2007 blog entry, I  
found a workaround. Add this to the body of the ApplicationController  
class in application.rb :

```
def default_url_options(options)
{ :trailing_slash => true }
end
```
