Problem with attachment_fu and ImageScience

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:

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'

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']: <nil> 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]: <false> is not true.

15) Failure: test_should_invalidate_small_files(ValidationTest) [./test/ validation_test.rb:28]: <false> is not true.

16) Failure: test_should_require_filename(ValidationTest) [./test/ validation_test.rb:49]: <nil> 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)

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

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

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

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