Page Attachments - live server won't upload images

I just switched from Radiant 0.6.1 full-install to Radiant 0.6.2 on gem.
Locally everything worked fine, but on the live server the Page
Attachments extension won’t upload image files (JPG and PNG tested).
Text files and 1MB+ PDFs work fine, but images are a no-go.

I’m 99% sure this is just a server issue and not a Page Attachments bug.
The server has the image_science gem for processing images, but NOT
RMagick or ImageMagick. Here is the log output:

TypeError (Unknown file format):
/users/home/MYAPPNAME/web/vendor/extensions/page_attachments/lib/technoweenie/attachment_fu/processors/image_science_processor.rb:14:in
with_image' /users/home/MYAPPNAME/web/vendor/extensions/page_attachments/lib/technoweenie/attachment_fu/processors/image_science_processor.rb:14:inwith_image’
/users/home/MYAPPNAME/web/vendor/extensions/page_attachments/lib/technoweenie/attachment_fu.rb:317:in
with_image' /users/home/MYAPPNAME/web/vendor/extensions/page_attachments/lib/technoweenie/attachment_fu/processors/image_science_processor.rb:21:inprocess_attachment’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/callbacks.rb:333:in
send' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/callbacks.rb:333:incallback’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/callbacks.rb:330:in
each' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/callbacks.rb:330:incallback’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/callbacks.rb:301:in
valid?' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/validations.rb:751:insave_without_transactions’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/transactions.rb:129:in
save' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:59:intransaction’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/transactions.rb:95:in
transaction' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/transactions.rb:121:intransaction’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/transactions.rb:129:in
save' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb:163:ininsert_record’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:26:in
<<' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:23:ineach’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:23:in
<<' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:59:intransaction’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/transactions.rb:95:in
transaction' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/transactions.rb:121:intransaction’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:22:in
<<' /users/home/MYAPPNAME/web/vendor/extensions/page_attachments/app/models/page_attachment_associations.rb:33:insave_attachments’
/users/home/MYAPPNAME/web/vendor/extensions/page_attachments/app/models/page_attachment_associations.rb:32:in
each' /users/home/MYAPPNAME/web/vendor/extensions/page_attachments/app/models/page_attachment_associations.rb:32:insave_attachments’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/callbacks.rb:333:in
send' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/callbacks.rb:333:incallback’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/callbacks.rb:330:in
each' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/callbacks.rb:330:incallback’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/callbacks.rb:243:in
create_or_update' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/base.rb:1545:insave_without_validation’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/validations.rb:752:in
save_without_transactions' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/transactions.rb:129:insave’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:59:in
transaction' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/transactions.rb:95:intransaction’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/transactions.rb:121:in
transaction' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/transactions.rb:129:insave’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/app/controllers/admin/page_controller.rb:110:in
save' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/app/controllers/admin/abstract_model_controller.rb:116:inhandle_new_or_edit_post’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/app/controllers/admin/page_controller.rb:25:in
edit' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/actionpack/lib/action_controller/base.rb:1095:insend’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/actionpack/lib/action_controller/base.rb:1095:in
perform_action_without_filters' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/actionpack/lib/action_controller/filters.rb:632:incall_filter’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/actionpack/lib/action_controller/filters.rb:638:in
call_filter' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/actionpack/lib/action_controller/filters.rb:438:incall’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/actionpack/lib/action_controller/filters.rb:637:in
call_filter' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/actionpack/lib/action_controller/filters.rb:638:incall_filter’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/actionpack/lib/action_controller/filters.rb:438:in
call' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/actionpack/lib/action_controller/filters.rb:637:incall_filter’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/actionpack/lib/action_controller/filters.rb:638:in
call_filter' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/actionpack/lib/action_controller/filters.rb:438:incall’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/actionpack/lib/action_controller/filters.rb:637:in
call_filter' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/actionpack/lib/action_controller/filters.rb:638:incall_filter’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/actionpack/lib/action_controller/filters.rb:438:in
call' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/actionpack/lib/action_controller/filters.rb:637:incall_filter’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/actionpack/lib/action_controller/filters.rb:638:in
call_filter' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/actionpack/lib/action_controller/filters.rb:438:incall’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/actionpack/lib/action_controller/filters.rb:637:in
call_filter' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/actionpack/lib/action_controller/filters.rb:619:inperform_action_without_benchmark’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:66:in
perform_action_without_rescue' /usr/local/lib/ruby/1.8/benchmark.rb:293:inmeasure’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:66:in
perform_action_without_rescue' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/actionpack/lib/action_controller/rescue.rb:83:inperform_action’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/actionpack/lib/action_controller/base.rb:430:in
send' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/actionpack/lib/action_controller/base.rb:430:inprocess_without_filters’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/actionpack/lib/action_controller/filters.rb:624:in
process_without_session_management_support' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/actionpack/lib/action_controller/session_management.rb:114:inprocess_without_test’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/actionpack/lib/action_controller/test_process.rb:15:in
process' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/actionpack/lib/action_controller/base.rb:330:inprocess’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/railties/lib/dispatcher.rb:41:in
dispatch' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/railties/lib/fcgi_handler.rb:168:inprocess_request’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/railties/lib/fcgi_handler.rb:143:in
process_each_request!' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/railties/lib/fcgi_handler.rb:109:inwith_signal_handler’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/railties/lib/fcgi_handler.rb:142:in
process_each_request!' /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:612:ineach_cgi’
/usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in
each' /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:ineach_cgi’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/railties/lib/fcgi_handler.rb:141:in
process_each_request!' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/railties/lib/fcgi_handler.rb:55:inprocess!’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/railties/lib/fcgi_handler.rb:25:in
`process!’
/users/home/MYAPPNAME/web/public/dispatch.fcgi:24

David,

Make sure the public and tmp directories are writeable by the webserver
or FCGI process; it may be unable to save the temporary file to resize
it.

Sean

Login to your account and try this:

$ irb -rubygems

require ‘image_science’

See if that produces an error. If it does, contact your administrator.

Sean

i had some issues with image_science too but mostly. you better
they were related to RubyInline. Check if your RubyInline gem installed
properly and working. it can silently quit when it does not found
INLINEDIR or HOME in your ENVironment

P.S. require ‘image_science’ gives you true if it finds the gem
installed
but does not telling you anything if something goes wrong. try after
require ‘image_science’ put

ImageScience
if you will see uninitialized constant ImageScience then gem requirement
failed for some reasons.

Thanks, Keymone. Actually when it was improperly configured on my TxD
account, I would get stacktraces just from requiring it. But yes, you
are right that the problem usually comes down to RubyInline.

Sean

David P. wrote:

I just switched from Radiant 0.6.1 full-install to Radiant 0.6.2 on gem.
Locally everything worked fine, but on the live server the Page
Attachments extension won’t upload image files (JPG and PNG tested).
Text files and 1MB+ PDFs work fine, but images are a no-go.

The server has the image_science gem for processing images, but NOT
RMagick or ImageMagick. Here is the log output:

TypeError (Unknown file format):
/users/home/MYAPPNAME/web/vendor/extensions/page_attachments/lib/technoweenie/attachment_fu/processors/image_science_processor.rb:14:in
with_image' /users/home/MYAPPNAME/web/vendor/extensions/page_attachments/lib/technoweenie/attachment_fu/processors/image_science_processor.rb:14:inwith_image’
/users/home/MYAPPNAME/web/vendor/extensions/page_attachments/lib/technoweenie/attachment_fu.rb:317:in
with_image' /users/home/MYAPPNAME/web/vendor/extensions/page_attachments/lib/technoweenie/attachment_fu/processors/image_science_processor.rb:21:inprocess_attachment’
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/callbacks.rb:333:in
send' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/callbacks.rb:333:incallback’

All directory permissions are set properly, but I’m still getting the
error. I’m wondering if it is a bug with image_science (1.1.1, 1.1.0),
as another Radiant site of mine running a frozen 0.6.1 with
image_science 1.1.3 is uploading images and creating thumbnails just
fine.

Any ideas?