This project is archived and is in readonly mode.

#6003 ✓invalid
Neil Middleton

3.0.3 - NoMethodError: undefined method `to_tempfile' for #<ActionDispatch::Http::UploadedFile:0x2b9161fb8470>

Reported by Neil Middleton | November 18th, 2010 @ 03:56 PM

Uploading files with Paperclip to S3 returns the backtrace below.

This works fine in 3.0.1

.bundle/gems/ruby/1.8/gems/paperclip-2.3.4/lib/paperclip/attachment.rb:91:in assign'

.bundle/gems/ruby/1.8/gems/paperclip-2.3.4/lib/paperclip.rb:246:in file='

.bundle/gems/ruby/1.8/gems/activerecord-3.0.3/lib/active_record/base.rb:1559:in send'

.bundle/gems/ruby/1.8/gems/activerecord-3.0.3/lib/active_record/base.rb:1559:in attributes='

.bundle/gems/ruby/1.8/gems/activerecord-3.0.3/lib/active_record/base.rb:1555:in each'

.bundle/gems/ruby/1.8/gems/activerecord-3.0.3/lib/active_record/base.rb:1555:in attributes='

.bundle/gems/ruby/1.8/gems/activerecord-3.0.3/lib/active_record/base.rb:1406:in initialize'

.bundle/gems/ruby/1.8/gems/inherited_resources-1.1.2/lib/inherited_resources/base_helpers.rb:49:in new'

.bundle/gems/ruby/1.8/gems/inherited_resources-1.1.2/lib/inherited_resources/base_helpers.rb:49:in send'

.bundle/gems/ruby/1.8/gems/inherited_resources-1.1.2/lib/inherited_resources/base_helpers.rb:49:in build_resource'

.bundle/gems/ruby/1.8/gems/inherited_resources-1.1.2/lib/inherited_resources/actions.rb:31:in create!'

app/controllers/uploads_controller.rb:6:in create'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/action_controller/metal/implicit_render.rb:4:in send_action'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/action_controller/metal/implicit_render.rb:4:in send_action'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/abstract_controller/base.rb:151:in process_action'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/action_controller/metal/rendering.rb:11:in process_action'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/abstract_controller/callbacks.rb:18:in process_action'

.bundle/gems/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:460:in _run__332488252__process_action__1623385099__callbacks'

.bundle/gems/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:409:in send'

.bundle/gems/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:409:in _run_process_action_callbacks'

.bundle/gems/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:93:in send'

.bundle/gems/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:93:in run_callbacks'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/abstract_controller/callbacks.rb:17:in process_action'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/action_controller/metal/instrumentation.rb:30:in process_action'

.bundle/gems/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/notifications.rb:52:in instrument'

.bundle/gems/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/notifications/instrumenter.rb:21:in instrument'

.bundle/gems/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/notifications.rb:52:in instrument'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/action_controller/metal/instrumentation.rb:29:in process_action'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/action_controller/metal/rescue.rb:17:in process_action'

vendor/plugins/rpm/lib/new_relic/agent/instrumentation/rails3/action_controller.rb:34:in process_action'

vendor/plugins/rpm/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:252:in perform_action_with_newrelic_trace'

vendor/plugins/rpm/lib/new_relic/agent/method_tracer.rb:141:in trace_execution_scoped'

vendor/plugins/rpm/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:247:in perform_action_with_newrelic_trace'

vendor/plugins/rpm/lib/new_relic/agent/instrumentation/rails3/action_controller.rb:33:in process_action'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/abstract_controller/base.rb:120:in process'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/abstract_controller/rendering.rb:40:in process'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/action_controller/metal.rb:138:in dispatch'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/action_controller/metal/rack_delegation.rb:14:in dispatch'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/action_controller/metal.rb:178:in action'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/action_dispatch/routing/route_set.rb:62:in call'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/action_dispatch/routing/route_set.rb:62:in dispatch'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/action_dispatch/routing/route_set.rb:27:in call'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/action_dispatch/routing/mapper.rb:35:in call'

.bundle/gems/ruby/1.8/gems/rack-mount-0.6.13/lib/rack/mount/route_set.rb:148:in call'

.bundle/gems/ruby/1.8/gems/rack-mount-0.6.13/lib/rack/mount/code_generation.rb:93:in recognize'

.bundle/gems/ruby/1.8/gems/rack-mount-0.6.13/lib/rack/mount/code_generation.rb:82:in optimized_each'

.bundle/gems/ruby/1.8/gems/rack-mount-0.6.13/lib/rack/mount/code_generation.rb:92:in recognize'

.bundle/gems/ruby/1.8/gems/rack-mount-0.6.13/lib/rack/mount/route_set.rb:139:in call'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/action_dispatch/routing/route_set.rb:492:in call'

.bundle/gems/ruby/1.8/gems/haml-3.0.18/lib/sass/plugin/rack.rb:41:in call'

.bundle/gems/ruby/1.8/gems/warden-0.10.7/lib/warden/manager.rb:35:in call'

.bundle/gems/ruby/1.8/gems/warden-0.10.7/lib/warden/manager.rb:34:in catch'

.bundle/gems/ruby/1.8/gems/warden-0.10.7/lib/warden/manager.rb:34:in call'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/action_dispatch/middleware/best_standards_support.rb:17:in call'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/action_dispatch/middleware/head.rb:14:in call'

.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/methodoverride.rb:24:in call'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/action_dispatch/middleware/params_parser.rb:21:in call'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/action_dispatch/middleware/flash.rb:182:in call'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/action_dispatch/middleware/session/abstract_store.rb:149:in call'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/action_dispatch/middleware/cookies.rb:295:in call'

.bundle/gems/ruby/1.8/gems/activerecord-3.0.3/lib/active_record/query_cache.rb:32:in call'

.bundle/gems/ruby/1.8/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/query_cache.rb:28:in cache'

.bundle/gems/ruby/1.8/gems/activerecord-3.0.3/lib/active_record/query_cache.rb:12:in cache'

.bundle/gems/ruby/1.8/gems/activerecord-3.0.3/lib/active_record/query_cache.rb:31:in call'

.bundle/gems/ruby/1.8/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:353:in call'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/action_dispatch/middleware/callbacks.rb:46:in call'

.bundle/gems/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:415:in _run_call_callbacks'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/action_dispatch/middleware/callbacks.rb:44:in call'

.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/sendfile.rb:107:in call'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/action_dispatch/middleware/remote_ip.rb:48:in call'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/action_dispatch/middleware/show_exceptions.rb:46:in call'

.bundle/gems/ruby/1.8/gems/railties-3.0.3/lib/rails/rack/logger.rb:13:in call'

.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/runtime.rb:17:in call'

.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/lock.rb:11:in call'

.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/lock.rb:11:in synchronize'

.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/lock.rb:11:in call'

.bundle/gems/ruby/1.8/gems/actionpack-3.0.3/lib/action_dispatch/middleware/static.rb:30:in call'

.bundle/gems/ruby/1.8/gems/railties-3.0.3/lib/rails/application.rb:168:in call'

.bundle/gems/ruby/1.8/gems/railties-3.0.3/lib/rails/application.rb:77:in send'

.bundle/gems/ruby/1.8/gems/railties-3.0.3/lib/rails/application.rb:77:in method_missing'

/home/heroku_rack/lib/static_assets.rb:9:in call'

/home/heroku_rack/lib/last_access.rb:15:in call'

.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/urlmap.rb:47:in call'

.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/urlmap.rb:41:in each'

.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/urlmap.rb:41:in call'

/home/heroku_rack/lib/date_header.rb:14:in call'

.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:77:in call'

[GEM_ROOT]/gems/thin-1.2.6/lib/thin/connection.rb:76:in pre_process'

[GEM_ROOT]/gems/thin-1.2.6/lib/thin/connection.rb:74:in catch'

[GEM_ROOT]/gems/thin-1.2.6/lib/thin/connection.rb:74:in pre_process'

[GEM_ROOT]/gems/thin-1.2.6/lib/thin/connection.rb:57:in process'

[GEM_ROOT]/gems/thin-1.2.6/lib/thin/connection.rb:42:in receive_data'

[GEM_ROOT]/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in run_machine'

[GEM_ROOT]/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in run'

[GEM_ROOT]/gems/thin-1.2.6/lib/thin/backends/base.rb:57:in start'

[GEM_ROOT]/gems/thin-1.2.6/lib/thin/server.rb:156:in start'

[GEM_ROOT]/gems/thin-1.2.6/lib/thin/controllers/controller.rb:80:in start'

[GEM_ROOT]/gems/thin-1.2.6/lib/thin/runner.rb:177:in send'

[GEM_ROOT]/gems/thin-1.2.6/lib/thin/runner.rb:177:in run_command'

[GEM_ROOT]/gems/thin-1.2.6/lib/thin/runner.rb:143:in run!'

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages