# Problem with attachment\_fu and ImageScience

**URL:** <https://www.ruby-forum.com/t/problem-with-attachment-fu-and-imagescience/149135>\
**Category:** Rails\
**Created:** [September 21, 2008, 11:04am UTC](https://www.ruby-forum.com/t/problem-with-attachment-fu-and-imagescience/149135 "2008-09-21T11:04:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Victor\_Hahn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/eada6e/32.png) [@Victor\_Hahn](https://www.ruby-forum.com/u/Victor_Hahn)\
**Post date:** [September 21, 2008, 11:04am UTC](https://www.ruby-forum.com/t/problem-with-attachment-fu-and-imagescience/149135/1 "2008-09-21T11:04:25Z")

</div>

Hi,

I’m having trouble getting the attachment\_fu plugin to generate  
thumbnails. I’m using ImageScience and everything worked flawlessly on  
my laptop, but on the deployment server no thumbnails are being  
generated. Both boxes are Linux. I forced the same Rails version on  
both:  
RAILS\_GEM\_VERSION = ‘2.0.2’ unless defined? RAILS\_GEM\_VERSION

Generating the thumbnails simply fails silently, there is no error  
message or log entry whatsoever. Generating a thumnail manually on  
script/console works, so I guess ImageScience is installed correctly.  
To find out more I tried “rake test” in the attachment\_fu directory.  
There were a lot of errors, most probably because ImaceScience is the  
only processor installed, but this one startles me:

1. Error:  
test\_should\_resize\_image(ImageScienceTest):  
ActiveRecord::SubclassNotFound: The single-table inheritance mechanism  
failed to locate the subclass: ‘NULL’. This error is raised because  
the column ‘type’ is reserved for storing the class in case of  
inheritance. Please rename this column if you didn’t intend it to be  
used for storing the inheritance class or overwrite  
ImageScienceAttachment.inheritance\_column to use another column for  
that information.  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1318:in `instantiate' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:532:in`find\_by\_sql’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:532:in `collect!' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:532:in`find\_by\_sql’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1233:in `find_every' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:1264:in`find\_one’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1250:in `find_from_ids' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:504:in`find’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:2085:in `reload' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:85:in`upload\_file’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
test\_helper.rb:94:in `use_temp_file' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:83:in`upload\_file’  
./test/processors/image\_science\_test.rb:8:in  
`test\_should\_resize\_image’

I can’t really figure out what this means. After all, attachment\_fu  
works perfectly on my laptop using the same version of Rails.

Any hints about this…?

Best regards,  
Victor

PS: Here’s the compete test output:

lvps87-230-23-18:/var/www/lab.candylarry.de/vendor/plugins/  
attachment\_fu# rake test  
(in /var/www/lab.candylarry.de/vendor/plugins/attachment\_fu)  
/usr/bin/ruby1.8 -Ilib:lib “/usr/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/  
rake/rake\_test\_loader.rb” “test/basic\_test.rb” “test/  
extra\_attachment\_test.rb” “test/geometry\_test.rb” “test/  
validation\_test.rb” “test/backends/db\_file\_test.rb” “test/backends/  
file\_system\_test.rb” “test/backends/remote/s3\_test.rb” “test/  
processors/core\_image\_test.rb” “test/processors/gd2\_test.rb” “test/  
processors/image\_science\_test.rb” “test/processors/  
mini\_magick\_test.rb” “test/processors/rmagick\_test.rb”  
– create\_table(:attachments, {:force=\>true})  
-\> 0.1043s  
– create\_table(:file\_attachments, {:force=\>true})  
-\> 0.0217s  
– create\_table(:gd2\_attachments, {:force=\>true})  
-\> 0.0188s  
– create\_table(:image\_science\_attachments, {:force=\>true})  
-\> 0.0248s  
– create\_table(:core\_image\_attachments, {:force=\>true})  
-\> 0.0186s  
– create\_table(:mini\_magick\_attachments, {:force=\>true})  
-\> 0.0233s  
– create\_table(:mini\_magick\_attachments, {:force=\>true})  
-\> 0.0324s  
– create\_table(:orphan\_attachments, {:force=\>true})  
-\> 0.0156s  
– create\_table(:minimal\_attachments, {:force=\>true})  
-\> 0.0162s  
– create\_table(:db\_files, {:force=\>true})  
-\> 0.0172s  
– create\_table(:s3\_attachments, {:force=\>true})  
-\> 0.0238s  
– initialize\_schema\_information()  
-\> 0.0008s  
– columns(“schema\_info”)  
-\> 0.0015s  
Problems loading rmagickProcessor: no such file to load – RMagick  
Problems loading rmagickProcessor: Expected /var/www/lab.candylarry.de/  
vendor/plugins/attachment\_fu/lib/technoweenie/attachment\_fu/processors/  
rmagick\_processor.rb to define  
Technoweenie::AttachmentFu::Processors::RmagickProcessor  
Problems loading rmagickProcessor: Expected /var/www/lab.candylarry.de/  
vendor/plugins/attachment\_fu/lib/technoweenie/attachment\_fu/processors/  
rmagick\_processor.rb to define  
Technoweenie::AttachmentFu::Processors::RmagickProcessor  
Problems loading rmagickProcessor: Expected /var/www/lab.candylarry.de/  
vendor/plugins/attachment\_fu/lib/technoweenie/attachment\_fu/processors/  
rmagick\_processor.rb to define  
Technoweenie::AttachmentFu::Processors::RmagickProcessor  
Problems loading core\_imageProcessor: no such file to load – osx/  
cocoa  
Problems loading mini\_magickProcessor: no such file to load –  
mini\_magick  
Problems loading gd2Processor: no such file to load – gd2  
S3 error: AWS::S3 could not be loaded  
Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake/  
rake\_test\_loader  
Started  
…CoreImage not loaded, tests not running  
…F…E.EEEE.E.EFEEE.GD2 not loaded, tests not running  
…EMiniMagick not loaded, tests not running  
…RMagick not installed, no tests running  
.s3 config file not loaded, tests not running  
.FFF.  
Finished in 4.433083 seconds.

1. Failure:  
test\_should\_create\_file\_from\_uploaded\_file(DbFileTest)  
[/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
base\_attachment\_tests.rb:10:in  
`test_should_create_file_from_uploaded_file' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:106:in`assert\_created’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
test\_helper.rb:127:in `assert_difference' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:100:in`assert\_created’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
base\_attachment\_tests.rb:3:in  
`test\_should\_create\_file\_from\_uploaded\_file’]:  
 expected but was  
\<0\>.

2. Error:  
test\_filesystem\_size\_for\_file\_attachment(FileSystemTest):  
ActiveRecord::SubclassNotFound: The single-table inheritance mechanism  
failed to locate the subclass: ‘NULL’. This error is raised because  
the column ‘type’ is reserved for storing the class in case of  
inheritance. Please rename this column if you didn’t intend it to be  
used for storing the inheritance class or overwrite  
FileAttachment.inheritance\_column to use another column for that  
information.  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1318:in `instantiate' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:532:in`find\_by\_sql’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:532:in `collect!' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:532:in`find\_by\_sql’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1233:in `find_every' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:1264:in`find\_one’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1250:in `find_from_ids' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:504:in`find’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:2085:in `reload' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:85:in`upload\_file’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
test\_helper.rb:94:in `use_temp_file' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:83:in`upload\_file’  
./test/backends/file\_system\_test.rb:10:in  
`test_filesystem_size_for_file_attachment' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:106:in`assert\_created’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
test\_helper.rb:127:in `assert_difference' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:100:in`assert\_created’  
./test/backends/file\_system\_test.rb:9:in  
`test\_filesystem\_size\_for\_file\_attachment’

3. Error:  
test\_no\_reassign\_attribute\_data\_on\_nil(FileSystemTest):  
ActiveRecord::SubclassNotFound: The single-table inheritance mechanism  
failed to locate the subclass: ‘NULL’. This error is raised because  
the column ‘type’ is reserved for storing the class in case of  
inheritance. Please rename this column if you didn’t intend it to be  
used for storing the inheritance class or overwrite  
FileAttachment.inheritance\_column to use another column for that  
information.  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1318:in `instantiate' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:532:in`find\_by\_sql’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:532:in `collect!' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:532:in`find\_by\_sql’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1233:in `find_every' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:1264:in`find\_one’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1250:in `find_from_ids' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:504:in`find’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:2085:in `reload' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:85:in`upload\_file’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
test\_helper.rb:94:in `use_temp_file' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:83:in`upload\_file’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
base\_attachment\_tests.rb:31:in  
`test_no_reassign_attribute_data_on_nil' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:106:in`assert\_created’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
test\_helper.rb:127:in `assert_difference' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:100:in`assert\_created’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
base\_attachment\_tests.rb:30:in  
`test\_no\_reassign\_attribute\_data\_on\_nil’

4. Error:  
test\_reassign\_attribute\_data(FileSystemTest):  
ActiveRecord::SubclassNotFound: The single-table inheritance mechanism  
failed to locate the subclass: ‘NULL’. This error is raised because  
the column ‘type’ is reserved for storing the class in case of  
inheritance. Please rename this column if you didn’t intend it to be  
used for storing the inheritance class or overwrite  
FileAttachment.inheritance\_column to use another column for that  
information.  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1318:in `instantiate' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:532:in`find\_by\_sql’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:532:in `collect!' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:532:in`find\_by\_sql’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1233:in `find_every' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:1264:in`find\_one’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1250:in `find_from_ids' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:504:in`find’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:2085:in `reload' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:85:in`upload\_file’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
test\_helper.rb:94:in `use_temp_file' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:83:in`upload\_file’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
base\_attachment\_tests.rb:17:in `test_reassign_attribute_data' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:106:in`assert\_created’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
test\_helper.rb:127:in `assert_difference' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:100:in`assert\_created’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
base\_attachment\_tests.rb:16:in `test\_reassign\_attribute\_data’

5. Error:  
test\_should\_create\_file\_from\_uploaded\_file(FileSystemTest):  
ActiveRecord::SubclassNotFound: The single-table inheritance mechanism  
failed to locate the subclass: ‘NULL’. This error is raised because  
the column ‘type’ is reserved for storing the class in case of  
inheritance. Please rename this column if you didn’t intend it to be  
used for storing the inheritance class or overwrite  
FileAttachment.inheritance\_column to use another column for that  
information.  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1318:in `instantiate' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:532:in`find\_by\_sql’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:532:in `collect!' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:532:in`find\_by\_sql’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1233:in `find_every' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:1264:in`find\_one’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1250:in `find_from_ids' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:504:in`find’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:2085:in `reload' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:85:in`upload\_file’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
test\_helper.rb:94:in `use_temp_file' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:83:in`upload\_file’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
base\_attachment\_tests.rb:4:in  
`test_should_create_file_from_uploaded_file' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:106:in`assert\_created’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
test\_helper.rb:127:in `assert_difference' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:100:in`assert\_created’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
base\_attachment\_tests.rb:3:in  
`test\_should\_create\_file\_from\_uploaded\_file’

6. Error:  
test\_should\_delete\_old\_file\_when\_renaming(FileSystemTest):  
ActiveRecord::SubclassNotFound: The single-table inheritance mechanism  
failed to locate the subclass: ‘NULL’. This error is raised because  
the column ‘type’ is reserved for storing the class in case of  
inheritance. Please rename this column if you didn’t intend it to be  
used for storing the inheritance class or overwrite  
FileAttachment.inheritance\_column to use another column for that  
information.  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1318:in `instantiate' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:532:in`find\_by\_sql’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:532:in `collect!' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:532:in`find\_by\_sql’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1233:in `find_every' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:1264:in`find\_one’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1250:in `find_from_ids' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:504:in`find’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:2085:in `reload' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:85:in`upload\_file’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
test\_helper.rb:94:in `use_temp_file' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:83:in`upload\_file’  
./test/backends/file\_system\_test.rb:67:in  
`test\_should\_delete\_old\_file\_when\_renaming’

7. Error:  
test\_should\_delete\_old\_file\_when\_updating(FileSystemTest):  
ActiveRecord::SubclassNotFound: The single-table inheritance mechanism  
failed to locate the subclass: ‘NULL’. This error is raised because  
the column ‘type’ is reserved for storing the class in case of  
inheritance. Please rename this column if you didn’t intend it to be  
used for storing the inheritance class or overwrite  
FileAttachment.inheritance\_column to use another column for that  
information.  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1318:in `instantiate' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:532:in`find\_by\_sql’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:532:in `collect!' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:532:in`find\_by\_sql’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1233:in `find_every' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:1264:in`find\_one’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1250:in `find_from_ids' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:504:in`find’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:2085:in `reload' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:85:in`upload\_file’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
test\_helper.rb:94:in `use_temp_file' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:83:in`upload\_file’  
./test/backends/file\_system\_test.rb:50:in  
`test\_should\_delete\_old\_file\_when\_updating’

8. Error:  
test\_should\_not\_overwrite\_file\_attachment(FileSystemTest):  
ActiveRecord::SubclassNotFound: The single-table inheritance mechanism  
failed to locate the subclass: ‘NULL’. This error is raised because  
the column ‘type’ is reserved for storing the class in case of  
inheritance. Please rename this column if you didn’t intend it to be  
used for storing the inheritance class or overwrite  
FileAttachment.inheritance\_column to use another column for that  
information.  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1318:in `instantiate' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:532:in`find\_by\_sql’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:532:in `collect!' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:532:in`find\_by\_sql’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1233:in `find_every' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:1264:in`find\_one’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1250:in `find_from_ids' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:504:in`find’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:2085:in `reload' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:85:in`upload\_file’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
test\_helper.rb:94:in `use_temp_file' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:83:in`upload\_file’  
./test/backends/file\_system\_test.rb:20:in  
`test_should_not_overwrite_file_attachment' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:106:in`assert\_created’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
test\_helper.rb:127:in `assert_difference' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:100:in`assert\_created’  
./test/backends/file\_system\_test.rb:19:in  
`test\_should\_not\_overwrite\_file\_attachment’

9. Failure:  
test\_should\_not\_overwrite\_file\_attachment\_on\_subclass(FileSystemTest)  
[./test/backends/file\_system\_test.rb:29:in  
`test_should_not_overwrite_file_attachment' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:106:in`assert\_created’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
test\_helper.rb:127:in `assert_difference' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:100:in`assert\_created’  
./test/backends/file\_system\_test.rb:19:in  
`test_should_not_overwrite_file_attachment' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:73:in`send’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
test\_helper.rb:73:in  
`test\_should\_not\_overwrite\_file\_attachment\_on\_subclass’]:  
\<4217\> expected to be != to  
\<4217\>.

10. Error:  
test\_should\_overwrite\_old\_contents\_when\_updating(FileSystemTest):  
ActiveRecord::SubclassNotFound: The single-table inheritance mechanism  
failed to locate the subclass: ‘NULL’. This error is raised because  
the column ‘type’ is reserved for storing the class in case of  
inheritance. Please rename this column if you didn’t intend it to be  
used for storing the inheritance class or overwrite  
FileAttachment.inheritance\_column to use another column for that  
information.  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1318:in `instantiate' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:532:in`find\_by\_sql’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:532:in `collect!' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:532:in`find\_by\_sql’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1233:in `find_every' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:1264:in`find\_one’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1250:in `find_from_ids' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:504:in`find’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:2085:in `reload' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:85:in`upload\_file’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
test\_helper.rb:94:in `use_temp_file' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:83:in`upload\_file’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
base\_attachment\_tests.rb:41:in  
`test\_should\_overwrite\_old\_contents\_when\_updating’

11. Error:  
test\_should\_save\_without\_updating\_file(FileSystemTest):  
ActiveRecord::SubclassNotFound: The single-table inheritance mechanism  
failed to locate the subclass: ‘NULL’. This error is raised because  
the column ‘type’ is reserved for storing the class in case of  
inheritance. Please rename this column if you didn’t intend it to be  
used for storing the inheritance class or overwrite  
FileAttachment.inheritance\_column to use another column for that  
information.  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1318:in `instantiate' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:532:in`find\_by\_sql’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:532:in `collect!' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:532:in`find\_by\_sql’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1233:in `find_every' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:1264:in`find\_one’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1250:in `find_from_ids' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:504:in`find’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:2085:in `reload' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:85:in`upload\_file’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
test\_helper.rb:94:in `use_temp_file' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:83:in`upload\_file’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
base\_attachment\_tests.rb:52:in  
`test\_should\_save\_without\_updating\_file’

12. Error:  
test\_should\_store\_file\_attachment\_in\_filesystem(FileSystemTest):  
ActiveRecord::SubclassNotFound: The single-table inheritance mechanism  
failed to locate the subclass: ‘NULL’. This error is raised because  
the column ‘type’ is reserved for storing the class in case of  
inheritance. Please rename this column if you didn’t intend it to be  
used for storing the inheritance class or overwrite  
FileAttachment.inheritance\_column to use another column for that  
information.  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1318:in `instantiate' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:532:in`find\_by\_sql’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:532:in `collect!' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:532:in`find\_by\_sql’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1233:in `find_every' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:1264:in`find\_one’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1250:in `find_from_ids' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:504:in`find’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:2085:in `reload' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:85:in`upload\_file’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
test\_helper.rb:94:in `use_temp_file' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:83:in`upload\_file’  
./test/backends/file\_system\_test.rb:39:in  
`test_should_store_file_attachment_in_filesystem' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:106:in`assert\_created’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
test\_helper.rb:127:in `assert_difference' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:100:in`assert\_created’  
./test/backends/file\_system\_test.rb:38:in  
`test\_should\_store\_file\_attachment\_in\_filesystem’

13. Error:  
test\_should\_resize\_image(ImageScienceTest):  
ActiveRecord::SubclassNotFound: The single-table inheritance mechanism  
failed to locate the subclass: ‘NULL’. This error is raised because  
the column ‘type’ is reserved for storing the class in case of  
inheritance. Please rename this column if you didn’t intend it to be  
used for storing the inheritance class or overwrite  
ImageScienceAttachment.inheritance\_column to use another column for  
that information.  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1318:in `instantiate' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:532:in`find\_by\_sql’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:532:in `collect!' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:532:in`find\_by\_sql’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1233:in `find_every' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:1264:in`find\_one’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:1250:in `find_from_ids' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:504:in`find’  
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/  
base.rb:2085:in `reload' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:85:in`upload\_file’  
/var/www/lab.candylarry.de/vendor/plugins/attachment\_fu/test/  
test\_helper.rb:94:in `use_temp_file' /var/www/lab.candylarry.de/vendor/plugins/attachment_fu/test/ test_helper.rb:83:in`upload\_file’  
./test/processors/image\_science\_test.rb:8:in  
`test\_should\_resize\_image’

14. Failure:  
test\_should\_invalidate\_big\_files(ValidationTest) [./test/  
validation\_test.rb:14]:  
 is not true.

15. Failure:  
test\_should\_invalidate\_small\_files(ValidationTest) [./test/  
validation\_test.rb:28]:  
 is not true.

16. Failure:  
test\_should\_require\_filename(ValidationTest) [./test/  
validation\_test.rb:49]:  
 is not true.

72 tests, 215 assertions, 5 failures, 11 errors  
rake aborted!  
Command failed with status (1): [/usr/bin/ruby1.8 -Ilib:lib "/usr/lib/  
ruby/…]

(See full trace by running task with --trace)

---

<div class="post-metadata">

**Author:** ![Victor\_Hahn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/eada6e/32.png) [@Victor\_Hahn](https://www.ruby-forum.com/u/Victor_Hahn)\
**Post date:** [September 21, 2008, 11:15pm UTC](https://www.ruby-forum.com/t/problem-with-attachment-fu-and-imagescience/149135/2 "2008-09-21T23:15:53Z")

</div>

Victor,

I have found production/test deployment oddities can be resolved by  
switching your local “development” into “production” mode to force  
Rails to behave like it would on your server.

The quickest way to do this is to edit your database.yml and copy your  
“development:” block and rename to “production:”. Then change the name  
of the original “production:” block to something else like  
“production\_off:”. Restart your local development server but add the “-  
e production” or just “production” argument and you might find the  
same behavior. Now have eliminated your server as the culprit of the  
issue. For example, it could be a problem in the way you are using  
attachment\_fu. Development mode and production mode are not 100%  
congruous in my experience.

secondly, make sure you are not using reserved column names in your  
tables. This looks suspicious in that regard:

…The single-table inheritance mechanism  
failed to locate the subclass: ‘NULL’…

A good example is a “type” column. This is reserved for polymorphism  
and can introduce some unwanted automagically ActiveRecord behavior.

Hank

---

<div class="post-metadata">

**Author:** ![Victor\_Hahn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/eada6e/32.png) [@Victor\_Hahn](https://www.ruby-forum.com/u/Victor_Hahn)\
**Post date:** [September 22, 2008, 6:07am UTC](https://www.ruby-forum.com/t/problem-with-attachment-fu-and-imagescience/149135/3 "2008-09-22T06:07:05Z")

</div>

Hank,

thanks a lot for your answer! Actually, I’m still in development mode  
on the server - didn’t even dare touching this yet. I’m really  
startled by the fact that the test complains about a “test” column.  
There is none, I just double-checked the database and the migrations.  
There is a “content\_type” column because it’s needed by attachment\_fu,  
but I suppose this shouldn’t be a problem. After all, I still really  
don’t understand why it works on my laptop but not on the server using  
exactly the same versions of Rails and attachment\_fu.

The error about the “test” column occurs when running “rake test” in  
the attachment\_fu directory. Are there any other places that could  
have database definition? I noticed that “rake test” doesn’t print any  
errors when run in the attachment\_fu directory on my laptop.

Best regards,  
Victor

---

<div class="post-metadata">

**Author:** ![Victor\_Hahn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/eada6e/32.png) [@Victor\_Hahn](https://www.ruby-forum.com/u/Victor_Hahn)\
**Post date:** [September 22, 2008, 4:45pm UTC](https://www.ruby-forum.com/t/problem-with-attachment-fu-and-imagescience/149135/4 "2008-09-22T16:45:06Z")

</div>

Ahh. rake test.

Well look at all your test fixtures. there is probably a column in one  
of those files that does not exist in real life.

H

---

<div class="post-metadata">

**Author:** ![Victor\_Hahn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/eada6e/32.png) [@Victor\_Hahn](https://www.ruby-forum.com/u/Victor_Hahn)\
**Post date:** [September 22, 2008, 11:51am UTC](https://www.ruby-forum.com/t/problem-with-attachment-fu-and-imagescience/149135/5 "2008-09-22T11:51:21Z")

</div>

Hi everybody,

I got it working by dumping Debian Etch’s packages and installing from  
source/gem. Guess Debian messed something up… Or there was a version  
incompatibility I didn’t realize. Who know; anyway, my project is back  
on it’s rails. ^^

Best regards,  
Victor
