# Attachment\_fu migration failure

**URL:** <https://www.ruby-forum.com/t/attachment-fu-migration-failure/119286>\
**Category:** Rails\
**Created:** [November 5, 2007, 8:07pm UTC](https://www.ruby-forum.com/t/attachment-fu-migration-failure/119286 "2007-11-05T20:07:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fredistic](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/a8b319/32.png) [@fredistic](https://www.ruby-forum.com/u/fredistic)\
**Post date:** [November 5, 2007, 8:07pm UTC](https://www.ruby-forum.com/t/attachment-fu-migration-failure/119286/1 "2007-11-05T20:07:04Z")

</div>

My migration is adding a few fields to the images table for  
attachment\_fu.

The error I get is:

> rake db:migrate  
> (in C:/InstantRails/rails\_apps/g1)  
> rake aborted!  
> uninitialized constant AttachmentImages

Is it making a class by that name?

–trace is useless, it tells me it was running ‘up’ in the migration.  
I knew that.

I searched all the files in the project for AttachmentImages but came  
up empty.

Boy, am I stuck.

The up part of the migration is:  
class AttachmentForImages \< ActiveRecord::Migration  
def self.up  
add\_column :images, :parent\_id, :integer  
add\_column :images, :content\_type, :string  
add\_column :images, :filename, :string  
add\_column :images, :thumbnail, :string  
add\_column :images, :size, :integer

```
add_index :images, :artist_id

```

end

I’m using postgresql 8.2 but it doesn’t get that far, and the table is  
not modified in the database. Rails is 1.2.4 and ruby is 1.8.6.

Any ideas? At all?

Fredistic
